home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1998-10-28 | 16.0 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Emacs Compiled Lisp
(other/emacsCompiledLisp).
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| Emacs Compiled Lisp (other/emacsCompiledLisp)
| magic
| Unsupported |
100%
| file
| Emacs/XEmacs v19 byte-compiled Lisp data
| default
| |
99%
| file
| data
| default
| |
100%
| TrID
| Emacs/XEmacs byte-compiled Lisp (generic)
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 72 6d 73 40 70 73 69 |piled by| rms@psi|
|00000020| 6c 6f 63 69 6e 2e 67 6e | 75 2e 61 69 2e 6d 69 74 |locin.gn|u.ai.mit|
|00000030| 2e 65 64 75 20 6f 6e 20 | 54 68 75 20 41 75 67 20 |.edu on |Thu Aug |
|00000040| 20 38 20 32 30 3a 32 32 | 3a 30 30 20 31 39 39 36 | 8 20:22|:00 1996|
|00000050| 0a 3b 3b 3b 20 66 72 6f | 6d 20 66 69 6c 65 20 2f |.;;; fro|m file /|
|00000060| 68 6f 6d 65 2f 66 73 66 | 2f 72 6d 73 2f 65 31 39 |home/fsf|/rms/e19|
|00000070| 2f 6c 69 73 70 2f 72 65 | 70 6c 61 63 65 2e 65 6c |/lisp/re|place.el|
|00000080| 0a 3b 3b 3b 20 65 6d 61 | 63 73 20 76 65 72 73 69 |.;;; ema|cs versi|
|00000090| 6f 6e 20 31 39 2e 33 32 | 2e 33 2e 0a 3b 3b 3b 20 |on 19.32|.3..;;; |
|000000a0| 62 79 74 65 63 6f 6d 70 | 20 76 65 72 73 69 6f 6e |bytecomp| version|
|000000b0| 20 46 53 46 20 32 2e 31 | 30 0a 3b 3b 3b 20 6f 70 | FSF 2.1|0.;;; op|
|000000c0| 74 69 6d 69 7a 61 74 69 | 6f 6e 20 69 73 20 6f 6e |timizati|on is on|
|000000d0| 2e 0a 3b 3b 3b 20 74 68 | 69 73 20 66 69 6c 65 20 |..;;; th|is file |
|000000e0| 75 73 65 73 20 6f 70 63 | 6f 64 65 73 20 77 68 69 |uses opc|odes whi|
|000000f0| 63 68 20 64 6f 20 6e 6f | 74 20 65 78 69 73 74 20 |ch do no|t exist |
|00000100| 69 6e 20 45 6d 61 63 73 | 20 31 38 2e 0a 0a 28 69 |in Emacs| 18...(i|
|00000110| 66 20 28 61 6e 64 20 28 | 62 6f 75 6e 64 70 20 27 |f (and (|boundp '|
|00000120| 65 6d 61 63 73 2d 76 65 | 72 73 69 6f 6e 29 0a 09 |emacs-ve|rsion)..|
|00000130| 20 28 6f 72 20 28 61 6e | 64 20 28 62 6f 75 6e 64 | (or (an|d (bound|
|00000140| 70 20 27 65 70 6f 63 68 | 3a 3a 76 65 72 73 69 6f |p 'epoch|::versio|
|00000150| 6e 29 20 65 70 6f 63 68 | 3a 3a 76 65 72 73 69 6f |n) epoch|::versio|
|00000160| 6e 29 0a 09 20 20 20 20 | 20 28 73 74 72 69 6e 67 |n).. | (string|
|00000170| 2d 6c 65 73 73 70 20 65 | 6d 61 63 73 2d 76 65 72 |-lessp e|macs-ver|
|00000180| 73 69 6f 6e 20 22 31 39 | 2e 32 39 22 29 29 29 0a |sion "19|.29"))).|
|00000190| 20 20 20 20 28 65 72 72 | 6f 72 20 22 60 72 65 70 | (err|or "`rep|
|000001a0| 6c 61 63 65 2e 65 6c 27 | 20 77 61 73 20 63 6f 6d |lace.el'| was com|
|000001b0| 70 69 6c 65 64 20 66 6f | 72 20 45 6d 61 63 73 20 |piled fo|r Emacs |
|000001c0| 31 39 2e 32 39 20 6f 72 | 20 6c 61 74 65 72 22 29 |19.29 or| later")|
|000001d0| 29 0a 0a 0a 23 40 36 38 | 20 2a 4e 6f 6e 2d 6e 69 |)...#@68| *Non-ni|
|000001e0| 6c 20 6d 65 61 6e 73 20 | 71 75 65 72 79 2d 72 65 |l means |query-re|
|000001f0| 70 6c 61 63 65 20 73 68 | 6f 75 6c 64 20 70 72 65 |place sh|ould pre|
|00000200| 73 65 72 76 65 20 63 61 | 73 65 20 69 6e 20 72 65 |serve ca|se in re|
|00000210| 70 6c 61 63 65 6d 65 6e | 74 73 2e 1f 0a 28 64 65 |placemen|ts...(de|
|00000220| 66 63 6f 6e 73 74 20 63 | 61 73 65 2d 72 65 70 6c |fconst c|ase-repl|
|00000230| 61 63 65 20 74 20 28 23 | 24 20 2e 20 2d 34 37 33 |ace t (#|$ . -473|
|00000240| 29 29 0a 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c0 |)).(byte|-code ".|
|00000250| c1 21 84 08 00 c2 11 c1 | 0b 42 13 c2 87 22 20 5b |.!......|.B..." [|
|00000260| 62 6f 75 6e 64 70 20 71 | 75 65 72 79 2d 72 65 70 |boundp q|uery-rep|
|00000270| 6c 61 63 65 2d 68 69 73 | 74 6f 72 79 20 6e 69 6c |lace-his|tory nil|
|00000280| 20 63 75 72 72 65 6e 74 | 2d 6c 6f 61 64 2d 6c 69 | current|-load-li|
|00000290| 73 74 5d 20 32 29 0a 23 | 40 39 38 20 4e 6f 6e 2d |st] 2).#|@98 Non-|
|000002a0| 6e 69 6c 20 6d 65 61 6e | 73 20 60 71 75 65 72 79 |nil mean|s `query|
|000002b0| 2d 72 65 70 6c 61 63 65 | 27 20 75 73 65 73 20 74 |-replace|' uses t|
|000002c0| 68 65 20 6c 61 73 74 20 | 73 65 61 72 63 68 20 73 |he last |search s|
|000002d0| 74 72 69 6e 67 2e 0a 54 | 68 61 74 20 62 65 63 6f |tring..T|hat beco|
|000002e0| 6d 65 73 20 74 68 65 20 | 22 73 74 72 69 6e 67 20 |mes the |"string |
|000002f0| 74 6f 20 72 65 70 6c 61 | 63 65 22 2e 1f 0a 28 64 |to repla|ce"...(d|
|00000300| 65 66 76 61 72 20 71 75 | 65 72 79 2d 72 65 70 6c |efvar qu|ery-repl|
|00000310| 61 63 65 2d 69 6e 74 65 | 72 61 63 74 69 76 65 20 |ace-inte|ractive |
|00000320| 6e 69 6c 20 28 23 24 20 | 2e 20 36 36 38 29 29 0a |nil (#$ |. 668)).|
|00000330| 28 64 65 66 61 6c 69 61 | 73 20 27 71 75 65 72 79 |(defalia|s 'query|
|00000340| 2d 72 65 70 6c 61 63 65 | 2d 72 65 61 64 2d 61 72 |-replace|-read-ar|
|00000350| 67 73 20 23 5b 28 73 74 | 72 69 6e 67 20 72 65 67 |gs #[(st|ring reg|
|00000360| 65 78 70 2d 66 6c 61 67 | 29 20 22 c0 89 19 1a 0b |exp-flag|) ".....|
|00000370| 83 17 00 5c 66 83 10 00 | 0d 82 12 00 0e 06 40 12 |...\f...|......@.|
|00000380| 82 23 00 c7 c8 c9 0e 5c | 6e 5c 22 c0 89 89 cb 25 |.#.....\|n\"....%|
|00000390| 12 c7 c8 cc 0e 5c 6e 5c | 6e 23 c0 89 89 cb 25 11 |.....\n\|n#....%.|
|000003a0| 5c 6e 09 0e 0d 45 2a 87 | 22 20 5b 6e 69 6c 20 74 |\n...E*.|" [nil t|
|000003b0| 6f 20 66 72 6f 6d 20 71 | 75 65 72 79 2d 72 65 70 |o from q|uery-rep|
|000003c0| 6c 61 63 65 2d 69 6e 74 | 65 72 61 63 74 69 76 65 |lace-int|eractive|
|000003d0| 20 72 65 67 65 78 70 2d | 66 6c 61 67 20 72 65 67 | regexp-|flag reg|
|000003e0| 65 78 70 2d 73 65 61 72 | 63 68 2d 72 69 6e 67 20 |exp-sear|ch-ring |
|000003f0| 73 65 61 72 63 68 2d 72 | 69 6e 67 20 72 65 61 64 |search-r|ing read|
|00000400| 2d 66 72 6f 6d 2d 6d 69 | 6e 69 62 75 66 66 65 72 |-from-mi|nibuffer|
|00000410| 20 66 6f 72 6d 61 74 20 | 22 25 73 3a 20 22 20 73 | format |"%s: " s|
|00000420| 74 72 69 6e 67 20 71 75 | 65 72 79 2d 72 65 70 6c |tring qu|ery-repl|
|00000430| 61 63 65 2d 68 69 73 74 | 6f 72 79 20 22 25 73 20 |ace-hist|ory "%s |
|00000440| 25 73 20 77 69 74 68 3a | 20 22 20 63 75 72 72 65 |%s with:| " curre|
|00000450| 6e 74 2d 70 72 65 66 69 | 78 2d 61 72 67 5d 20 36 |nt-prefi|x-arg] 6|
|00000460| 5d 29 0a 23 40 38 30 33 | 20 52 65 70 6c 61 63 65 |]).#@803| Replace|
|00000470| 20 73 6f 6d 65 20 6f 63 | 63 75 72 72 65 6e 63 65 | some oc|currence|
|00000480| 73 20 6f 66 20 46 52 4f | 4d 2d 53 54 52 49 4e 47 |s of FRO|M-STRING|
|00000490| 20 77 69 74 68 20 54 4f | 2d 53 54 52 49 4e 47 2e | with TO|-STRING.|
|000004a0| 0a 41 73 20 65 61 63 68 | 20 6d 61 74 63 68 20 69 |.As each| match i|
|000004b0| 73 20 66 6f 75 6e 64 2c | 20 74 68 65 20 75 73 65 |s found,| the use|
|000004c0| 72 20 6d 75 73 74 20 74 | 79 70 65 20 61 20 63 68 |r must t|ype a ch|
|000004d0| 61 72 61 63 74 65 72 20 | 73 61 79 69 6e 67 0a 77 |aracter |saying.w|
|000004e0| 68 61 74 20 74 6f 20 64 | 6f 20 77 69 74 68 20 69 |hat to d|o with i|
|000004f0| 74 2e 20 20 46 6f 72 20 | 64 69 72 65 63 74 69 6f |t. For |directio|
|00000500| 6e 73 2c 20 74 79 70 65 | 20 5c 5b 68 65 6c 70 2d |ns, type| \[help-|
|00000510| 63 6f 6d 6d 61 6e 64 5d | 20 61 74 20 74 68 61 74 |command]| at that|
|00000520| 20 74 69 6d 65 2e 0a 0a | 49 66 20 60 71 75 65 72 | time...|If `quer|
|00000530| 79 2d 72 65 70 6c 61 63 | 65 2d 69 6e 74 65 72 61 |y-replac|e-intera|
|00000540| 63 74 69 76 65 27 20 69 | 73 20 6e 6f 6e 2d 6e 69 |ctive' i|s non-ni|
|00000550| 6c 2c 20 74 68 65 20 6c | 61 73 74 20 69 6e 63 72 |l, the l|ast incr|
|00000560| 65 6d 65 6e 74 61 6c 20 | 73 65 61 72 63 68 0a 73 |emental |search.s|
|00000570| 74 72 69 6e 67 20 69 73 | 20 75 73 65 64 20 61 73 |tring is| used as|
|00000580| 20 46 52 4f 4d 2d 53 54 | 52 49 4e 47 2d 2d 79 6f | FROM-ST|RING--yo|
|00000590| 75 20 64 6f 6e 27 74 20 | 68 61 76 65 20 74 6f 20 |u don't |have to |
|000005a0| 73 70 65 63 69 66 79 20 | 69 74 20 77 69 74 68 20 |specify |it with |
|000005b0| 74 68 65 0a 6d 69 6e 69 | 62 75 66 66 65 72 2e 0a |the.mini|buffer..|
|000005c0| 0a 50 72 65 73 65 72 76 | 65 73 20 63 61 73 65 20 |.Preserv|es case |
|000005d0| 69 6e 20 65 61 63 68 20 | 72 65 70 6c 61 63 65 6d |in each |replacem|
|000005e0| 65 6e 74 20 69 66 20 60 | 63 61 73 65 2d 72 65 70 |ent if `|case-rep|
|000005f0| 6c 61 63 65 27 20 61 6e | 64 20 60 63 61 73 65 2d |lace' an|d `case-|
|00000600| 66 6f 6c 64 2d 73 65 61 | 72 63 68 27 0a 61 72 65 |fold-sea|rch'.are|
|00000610| 20 6e 6f 6e 2d 6e 69 6c | 20 61 6e 64 20 46 52 4f | non-nil| and FRO|
|00000620| 4d 2d 53 54 52 49 4e 47 | 20 68 61 73 20 6e 6f 20 |M-STRING| has no |
|00000630| 75 70 70 65 72 63 61 73 | 65 20 6c 65 74 74 65 72 |uppercas|e letter|
|00000640| 73 2e 0a 28 50 72 65 73 | 65 72 76 69 6e 67 20 63 |s..(Pres|erving c|
|00000650| 61 73 65 20 6d 65 61 6e | 73 20 74 68 61 74 20 69 |ase mean|s that i|
|00000660| 66 20 74 68 65 20 73 74 | 72 69 6e 67 20 6d 61 74 |f the st|ring mat|
|00000670| 63 68 65 64 20 69 73 20 | 61 6c 6c 20 63 61 70 73 |ched is |all caps|
|00000680| 2c 20 6f 72 20 63 61 70 | 69 74 61 6c 69 7a 65 64 |, or cap|italized|
|00000690| 2c 0a 74 68 65 6e 20 69 | 74 73 20 72 65 70 6c 61 |,.then i|ts repla|
|000006a0| 63 65 6d 65 6e 74 20 69 | 73 20 75 70 63 61 73 65 |cement i|s upcase|
|000006b0| 64 20 6f 72 20 63 61 70 | 69 74 61 6c 69 7a 65 64 |d or cap|italized|
|000006c0| 2e 29 0a 0a 54 68 69 72 | 64 20 61 72 67 20 44 45 |.)..Thir|d arg DE|
|000006d0| 4c 49 4d 49 54 45 44 20 | 28 70 72 65 66 69 78 20 |LIMITED |(prefix |
|000006e0| 61 72 67 20 69 66 20 69 | 6e 74 65 72 61 63 74 69 |arg if i|nteracti|
|000006f0| 76 65 29 2c 20 69 66 20 | 6e 6f 6e 2d 6e 69 6c 2c |ve), if |non-nil,|
|00000700| 20 6d 65 61 6e 73 20 72 | 65 70 6c 61 63 65 0a 6f | means r|eplace.o|
|00000710| 6e 6c 79 20 6d 61 74 63 | 68 65 73 20 73 75 72 72 |nly matc|hes surr|
|00000720| 6f 75 6e 64 65 64 20 62 | 79 20 77 6f 72 64 20 62 |ounded b|y word b|
|00000730| 6f 75 6e 64 61 72 69 65 | 73 2e 0a 0a 54 6f 20 63 |oundarie|s...To c|
|00000740| 75 73 74 6f 6d 69 7a 65 | 20 70 6f 73 73 69 62 6c |ustomize| possibl|
|00000750| 65 20 72 65 73 70 6f 6e | 73 65 73 2c 20 63 68 61 |e respon|ses, cha|
|00000760| 6e 67 65 20 74 68 65 20 | 22 62 69 6e 64 69 6e 67 |nge the |"binding|
|00000770| 73 22 20 69 6e 20 60 71 | 75 65 72 79 2d 72 65 70 |s" in `q|uery-rep|
|00000780| 6c 61 63 65 2d 6d 61 70 | 27 2e 1f 0a 28 64 65 66 |lace-map|'...(def|
|00000790| 61 6c 69 61 73 20 27 71 | 75 65 72 79 2d 72 65 70 |alias 'q|uery-rep|
|000007a0| 6c 61 63 65 20 23 5b 28 | 66 72 6f 6d 2d 73 74 72 |lace #[(|from-str|
|000007b0| 69 6e 67 20 74 6f 2d 73 | 74 72 69 6e 67 20 26 6f |ing to-s|tring &o|
|000007c0| 70 74 69 6f 6e 61 6c 20 | 61 72 67 29 20 22 c0 09 |ptional |arg) "..|
|000007d0| 5c 6e c3 c4 0d 25 87 22 | 20 5b 70 65 72 66 6f 72 |\n...%."| [perfor|
|000007e0| 6d 2d 72 65 70 6c 61 63 | 65 20 66 72 6f 6d 2d 73 |m-replac|e from-s|
|000007f0| 74 72 69 6e 67 20 74 6f | 2d 73 74 72 69 6e 67 20 |tring to|-string |
|00000800| 74 20 6e 69 6c 20 61 72 | 67 5d 20 36 20 28 23 24 |t nil ar|g] 6 (#$|
|00000810| 20 2e 20 31 31 32 39 29 | 20 28 71 75 65 72 79 2d | . 1129)| (query-|
|00000820| 72 65 70 6c 61 63 65 2d | 72 65 61 64 2d 61 72 67 |replace-|read-arg|
|00000830| 73 20 22 51 75 65 72 79 | 20 72 65 70 6c 61 63 65 |s "Query| replace|
|00000840| 22 20 6e 69 6c 29 5d 29 | 0a 28 64 65 66 69 6e 65 |" nil)])|.(define|
|00000850| 2d 6b 65 79 20 65 73 63 | 2d 6d 61 70 20 22 25 22 |-key esc|-map "%"|
|00000860| 20 28 71 75 6f 74 65 20 | 71 75 65 72 79 2d 72 65 | (quote |query-re|
|00000870| 70 6c 61 63 65 29 29 0a | 23 40 37 35 35 20 52 65 |place)).|#@755 Re|
|00000880| 70 6c 61 63 65 20 73 6f | 6d 65 20 74 68 69 6e 67 |place so|me thing|
|00000890| 73 20 61 66 74 65 72 20 | 70 6f 69 6e 74 20 6d 61 |s after |point ma|
|000008a0| 74 63 68 69 6e 67 20 52 | 45 47 45 58 50 20 77 69 |tching R|EGEXP wi|
|000008b0| 74 68 20 54 4f 2d 53 54 | 52 49 4e 47 2e 0a 41 73 |th TO-ST|RING..As|
|000008c0| 20 65 61 63 68 20 6d 61 | 74 63 68 20 69 73 20 66 | each ma|tch is f|
|000008d0| 6f 75 6e 64 2c 20 74 68 | 65 20 75 73 65 72 20 6d |ound, th|e user m|
|000008e0| 75 73 74 20 74 79 70 65 | 20 61 20 63 68 61 72 61 |ust type| a chara|
|000008f0| 63 74 65 72 20 73 61 79 | 69 6e 67 0a 77 68 61 74 |cter say|ing.what|
|00000900| 20 74 6f 20 64 6f 20 77 | 69 74 68 20 69 74 2e 20 | to do w|ith it. |
|00000910| 20 46 6f 72 20 64 69 72 | 65 63 74 69 6f 6e 73 2c | For dir|ections,|
|00000920| 20 74 79 70 65 20 5c 5b | 68 65 6c 70 2d 63 6f 6d | type \[|help-com|
|00000930| 6d 61 6e 64 5d 20 61 74 | 20 74 68 61 74 20 74 69 |mand] at| that ti|
|00000940| 6d 65 2e 0a 0a 49 66 20 | 60 71 75 65 72 79 2d 72 |me...If |`query-r|
|00000950| 65 70 6c 61 63 65 2d 69 | 6e 74 65 72 61 63 74 69 |eplace-i|nteracti|
|00000960| 76 65 27 20 69 73 20 6e | 6f 6e 2d 6e 69 6c 2c 20 |ve' is n|on-nil, |
|00000970| 74 68 65 20 6c 61 73 74 | 20 69 6e 63 72 65 6d 65 |the last| increme|
|00000980| 6e 74 61 6c 20 73 65 61 | 72 63 68 0a 72 65 67 65 |ntal sea|rch.rege|
|00000990| 78 70 20 69 73 20 75 73 | 65 64 20 61 73 20 52 45 |xp is us|ed as RE|
|000009a0| 47 45 58 50 2d 2d 79 6f | 75 20 64 6f 6e 27 74 20 |GEXP--yo|u don't |
|000009b0| 68 61 76 65 20 74 6f 20 | 73 70 65 63 69 66 79 20 |have to |specify |
|000009c0| 69 74 20 77 69 74 68 20 | 74 68 65 0a 6d 69 6e 69 |it with |the.mini|
|000009d0| 62 75 66 66 65 72 2e 0a | 0a 50 72 65 73 65 72 76 |buffer..|.Preserv|
|000009e0| 65 73 20 63 61 73 65 20 | 69 6e 20 65 61 63 68 20 |es case |in each |
|000009f0| 72 65 70 6c 61 63 65 6d | 65 6e 74 20 69 66 20 60 |replacem|ent if `|
|00000a00| 63 61 73 65 2d 72 65 70 | 6c 61 63 65 27 20 61 6e |case-rep|lace' an|
|00000a10| 64 20 60 63 61 73 65 2d | 66 6f 6c 64 2d 73 65 61 |d `case-|fold-sea|
|00000a20| 72 63 68 27 0a 61 72 65 | 20 6e 6f 6e 2d 6e 69 6c |rch'.are| non-nil|
|00000a30| 20 61 6e 64 20 52 45 47 | 45 58 50 20 68 61 73 20 | and REG|EXP has |
|00000a40| 6e 6f 20 75 70 70 65 72 | 63 61 73 65 20 6c 65 74 |no upper|case let|
|00000a50| 74 65 72 73 2e 0a 54 68 | 69 72 64 20 61 72 67 20 |ters..Th|ird arg |
|00000a60| 44 45 4c 49 4d 49 54 45 | 44 20 28 70 72 65 66 69 |DELIMITE|D (prefi|
|00000a70| 78 20 61 72 67 20 69 66 | 20 69 6e 74 65 72 61 63 |x arg if| interac|
|00000a80| 74 69 76 65 29 2c 20 69 | 66 20 6e 6f 6e 2d 6e 69 |tive), i|f non-ni|
|00000a90| 6c 2c 20 6d 65 61 6e 73 | 20 72 65 70 6c 61 63 65 |l, means| replace|
|00000aa0| 0a 6f 6e 6c 79 20 6d 61 | 74 63 68 65 73 20 73 75 |.only ma|tches su|
|00000ab0| 72 72 6f 75 6e 64 65 64 | 20 62 79 20 77 6f 72 64 |rrounded| by word|
|00000ac0| 20 62 6f 75 6e 64 61 72 | 69 65 73 2e 0a 49 6e 20 | boundar|ies..In |
|00000ad0| 54 4f 2d 53 54 52 49 4e | 47 2c 20 60 5c 26 27 20 |TO-STRIN|G, `\&' |
|00000ae0| 73 74 61 6e 64 73 20 66 | 6f 72 20 77 68 61 74 65 |stands f|or whate|
|00000af0| 76 65 72 20 6d 61 74 63 | 68 65 64 20 74 68 65 20 |ver matc|hed the |
|00000b00| 77 68 6f 6c 65 20 6f 66 | 20 52 45 47 45 58 50 2c |whole of| REGEXP,|
|00000b10| 0a 61 6e 64 20 60 5c 3d | 5c 4e 27 20 28 77 68 65 |.and `\=|\N' (whe|
|00000b20| 72 65 20 4e 20 69 73 20 | 61 20 64 69 67 69 74 29 |re N is |a digit)|
|00000b30| 20 73 74 61 6e 64 73 20 | 66 6f 72 0a 20 77 68 61 | stands |for. wha|
|00000b40| 74 65 76 65 72 20 77 68 | 61 74 20 6d 61 74 63 68 |tever wh|at match|
|00000b50| 65 64 20 74 68 65 20 4e | 74 68 20 60 5c 28 2e 2e |ed the N|th `\(..|
|00000b60| 2e 5c 29 27 20 69 6e 20 | 52 45 47 45 58 50 2e 1f |.\)' in |REGEXP..|
|00000b70| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 71 75 65 72 |.(defali|as 'quer|
|00000b80| 79 2d 72 65 70 6c 61 63 | 65 2d 72 65 67 65 78 70 |y-replac|e-regexp|
|00000b90| 20 23 5b 28 72 65 67 65 | 78 70 20 74 6f 2d 73 74 | #[(rege|xp to-st|
|00000ba0| 72 69 6e 67 20 26 6f 70 | 74 69 6f 6e 61 6c 20 61 |ring &op|tional a|
|00000bb0| 72 67 29 20 22 c0 09 5c | 6e c3 89 5c 66 25 87 22 |rg) "..\|n..\f%."|
|00000bc0| 20 5b 70 65 72 66 6f 72 | 6d 2d 72 65 70 6c 61 63 | [perfor|m-replac|
|00000bd0| 65 20 72 65 67 65 78 70 | 20 74 6f 2d 73 74 72 69 |e regexp| to-stri|
|00000be0| 6e 67 20 74 20 61 72 67 | 5d 20 36 20 28 23 24 20 |ng t arg|] 6 (#$ |
|00000bf0| 2e 20 32 31 37 34 29 20 | 28 71 75 65 72 79 2d 72 |. 2174) |(query-r|
|00000c00| 65 70 6c 61 63 65 2d 72 | 65 61 64 2d 61 72 67 73 |eplace-r|ead-args|
|00000c10| 20 22 51 75 65 72 79 20 | 72 65 70 6c 61 63 65 20 | "Query |replace |
|00000c20| 72 65 67 65 78 70 22 20 | 74 29 5d 29 0a 23 40 36 |regexp" |t)]).#@6|
|00000c30| 35 34 20 52 65 70 6c 61 | 63 65 20 73 6f 6d 65 20 |54 Repla|ce some |
|00000c40| 6d 61 74 63 68 65 73 20 | 66 6f 72 20 52 45 47 45 |matches |for REGE|
|00000c50| 58 50 20 77 69 74 68 20 | 76 61 72 69 6f 75 73 20 |XP with |various |
|00000c60| 73 74 72 69 6e 67 73 2c | 20 69 6e 20 72 6f 74 61 |strings,| in rota|
|00000c70| 74 69 6f 6e 2e 0a 54 68 | 65 20 73 65 63 6f 6e 64 |tion..Th|e second|
|00000c80| 20 61 72 67 75 6d 65 6e | 74 20 54 4f 2d 53 54 52 | argumen|t TO-STR|
|00000c90| 49 4e 47 53 20 63 6f 6e | 74 61 69 6e 73 20 74 68 |INGS con|tains th|
|00000ca0| 65 20 72 65 70 6c 61 63 | 65 6d 65 6e 74 20 73 74 |e replac|ement st|
|00000cb0| 72 69 6e 67 73 2c 20 73 | 65 70 61 72 61 74 65 64 |rings, s|eparated|
|00000cc0| 0a 62 79 20 73 70 61 63 | 65 73 2e 20 20 54 68 69 |.by spac|es. Thi|
|00000cd0| 73 20 63 6f 6d 6d 61 6e | 64 20 77 6f 72 6b 73 20 |s comman|d works |
|00000ce0| 6c 69 6b 65 20 60 71 75 | 65 72 79 2d 72 65 70 6c |like `qu|ery-repl|
|00000cf0| 61 63 65 2d 72 65 67 65 | 78 70 27 20 65 78 63 65 |ace-rege|xp' exce|
|00000d00| 70 74 0a 74 68 61 74 20 | 65 61 63 68 20 73 75 63 |pt.that |each suc|
|00000d10| 63 65 73 73 69 76 65 20 | 72 65 70 6c 61 63 65 6d |cessive |replacem|
|00000d20| 65 6e 74 20 75 73 65 73 | 20 74 68 65 20 6e 65 78 |ent uses| the nex|
|00000d30| 74 20 73 75 63 63 65 73 | 73 69 76 65 20 72 65 70 |t succes|sive rep|
|00000d40| 6c 61 63 65 6d 65 6e 74 | 20 73 74 72 69 6e 67 2c |lacement| string,|
|00000d50| 0a 77 72 61 70 70 69 6e | 67 20 61 72 6f 75 6e 64 |.wrappin|g around|
|00000d60| 20 66 72 6f 6d 20 74 68 | 65 20 6c 61 73 74 20 73 | from th|e last s|
|00000d70| 75 63 68 20 73 74 72 69 | 6e 67 20 74 6f 20 74 68 |uch stri|ng to th|
|00000d80| 65 20 66 69 72 73 74 2e | 0a 0a 4e 6f 6e 2d 69 6e |e first.|..Non-in|
|00000d90| 74 65 72 61 63 74 69 76 | 65 6c 79 2c 20 54 4f 2d |teractiv|ely, TO-|
|00000da0| 53 54 52 49 4e 47 53 20 | 6d 61 79 20 62 65 20 61 |STRINGS |may be a|
|00000db0| 20 6c 69 73 74 20 6f 66 | 20 72 65 70 6c 61 63 65 | list of| replace|
|00000dc0| 6d 65 6e 74 20 73 74 72 | 69 6e 67 73 2e 0a 0a 49 |ment str|ings...I|
|00000dd0| 66 20 60 71 75 65 72 79 | 2d 72 65 70 6c 61 63 65 |f `query|-replace|
|00000de0| 2d 69 6e 74 65 72 61 63 | 74 69 76 65 27 20 69 73 |-interac|tive' is|
|00000df0| 20 6e 6f 6e 2d 6e 69 6c | 2c 20 74 68 65 20 6c 61 | non-nil|, the la|
|00000e00| 73 74 20 69 6e 63 72 65 | 6d 65 6e 74 61 6c 20 73 |st incre|mental s|
|00000e10| 65 61 72 63 68 0a 72 65 | 67 65 78 70 20 69 73 20 |earch.re|gexp is |
|00000e20| 75 73 65 64 20 61 73 20 | 52 45 47 45 58 50 2d 2d |used as |REGEXP--|
|00000e30| 79 6f 75 20 64 6f 6e 27 | 74 20 68 61 76 65 20 74 |you don'|t have t|
|00000e40| 6f 20 73 70 65 63 69 66 | 79 20 69 74 20 77 69 74 |o specif|y it wit|
|00000e50| 68 20 74 68 65 20 6d 69 | 6e 69 62 75 66 66 65 72 |h the mi|nibuffer|
|00000e60| 2e 0a 0a 41 20 70 72 65 | 66 69 78 20 61 72 67 75 |...A pre|fix argu|
|00000e70| 6d 65 6e 74 20 4e 20 73 | 61 79 73 20 74 6f 20 75 |ment N s|ays to u|
|00000e80| 73 65 20 65 61 63 68 20 | 72 65 70 6c 61 63 65 6d |se each |replacem|
|00000e90| 65 6e 74 20 73 74 72 69 | 6e 67 20 4e 20 74 69 6d |ent stri|ng N tim|
|00000ea0| 65 73 0a 62 65 66 6f 72 | 65 20 72 6f 74 61 74 69 |es.befor|e rotati|
|00000eb0| 6e 67 20 74 6f 20 74 68 | 65 20 6e 65 78 74 2e 1f |ng to th|e next..|
|00000ec0| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 6d 61 70 2d |.(defali|as 'map-|
|00000ed0| 71 75 65 72 79 2d 72 65 | 70 6c 61 63 65 2d 72 65 |query-re|place-re|
|00000ee0| 67 65 78 70 20 23 5b 28 | 72 65 67 65 78 70 20 74 |gexp #[(|regexp t|
|00000ef0| 6f 2d 73 74 72 69 6e 67 | 73 20 26 6f 70 74 69 6f |o-string|s &optio|
|00000f00| 6e 61 6c 20 61 72 67 29 | 20 22 c0 19 5c 6e 3c 83 |nal arg)| "..\n<.|
|00000f10| 5c 66 00 5c 6e 11 82 3f | 00 5c 6e 47 c3 55 84 3f |\f.\n..?|.\nG.U.?|
|00000f20| 00 c4 c5 5c 6e 5c 22 83 | 33 00 c6 09 5c 6e c3 c4 |...\n\".|3...\n..|
|00000f30| c5 5c 6e 5c 22 4f 43 5c | 22 11 5c 6e c4 c5 5c 6e |.\n\"OC\|".\n..\n|
|00000f40| 5c 22 54 c0 4f 89 12 82 | 0d 00 c6 09 5c 6e 43 5c |\"T.O...|....\nC\|
|00000f50| 22 11 c7 89 12 82 0d 00 | c8 0e 09 09 ca 89 c0 0e |".......|........|
|00000f60| 0b 26 06 29 87 22 20 5b | 6e 69 6c 20 72 65 70 6c |.&.)." [|nil repl|
|00000f70| 61 63 65 6d 65 6e 74 73 | 20 74 6f 2d 73 74 72 69 |acements| to-stri|
|00000f80| 6e 67 73 20 30 20 73 74 | 72 69 6e 67 2d 6d 61 74 |ngs 0 st|ring-mat|
|00000f90| 63 68 20 22 20 22 20 61 | 70 70 65 6e 64 20 22 22 |ch " " a|ppend ""|
|00000fa0| 20 70 65 72 66 6f 72 6d | 2d 72 65 70 6c 61 63 65 | perform|-replace|
|00000fb0| 20 72 65 67 65 78 70 20 | 74 20 61 72 67 5d 20 38 | regexp |t arg] 8|
|00000fc0| 20 28 23 24 20 2e 20 33 | 31 32 33 29 20 28 6c 65 | (#$ . 3|123) (le|
|00000fd0| 74 20 28 66 72 6f 6d 20 | 74 6f 29 20 28 73 65 74 |t (from |to) (set|
|00000fe0| 71 20 66 72 6f 6d 20 28 | 69 66 20 71 75 65 72 79 |q from (|if query|
|00000ff0| 2d 72 65 70 6c 61 63 65 | 2d 69 6e 74 65 72 61 63 |-replace|-interac|
|00001000| 74 69 76 65 20 28 63 61 | 72 20 72 65 67 65 78 70 |tive (ca|r regexp|
|00001010| 2d 73 65 61 72 63 68 2d | 72 69 6e 67 29 20 28 72 |-search-|ring) (r|
|00001020| 65 61 64 2d 66 72 6f 6d | 2d 6d 69 6e 69 62 75 66 |ead-from|-minibuf|
|00001030| 66 65 72 20 22 4d 61 70 | 20 71 75 65 72 79 20 72 |fer "Map| query r|
|00001040| 65 70 6c 61 63 65 20 28 | 72 65 67 65 78 70 29 3a |eplace (|regexp):|
|00001050| 20 22 20 6e 69 6c 20 6e | 69 6c 20 6e 69 6c 20 28 | " nil n|il nil (|
|00001060| 71 75 6f 74 65 20 71 75 | 65 72 79 2d 72 65 70 6c |quote qu|ery-repl|
|00001070| 61 63 65 2d 68 69 73 74 | 6f 72 79 29 29 29 29 20 |ace-hist|ory)))) |
|00001080| 28 73 65 74 71 20 74 6f | 20 28 72 65 61 64 2d 66 |(setq to| (read-f|
|00001090| 72 6f 6d 2d 6d 69 6e 69 | 62 75 66 66 65 72 20 28 |rom-mini|buffer (|
|000010a0| 66 6f 72 6d 61 74 20 22 | 51 75 65 72 79 20 72 65 |format "|Query re|
|000010b0| 70 6c 61 63 65 20 25 73 | 20 77 69 74 68 20 28 73 |place %s| with (s|
|000010c0| 70 61 63 65 2d 73 65 70 | 61 72 61 74 65 64 20 73 |pace-sep|arated s|
|000010d0| 74 72 69 6e 67 73 29 3a | 20 22 20 66 72 6f 6d 29 |trings):| " from)|
|000010e0| 20 6e 69 6c 20 6e 69 6c | 20 6e 69 6c 20 28 71 75 | nil nil| nil (qu|
|000010f0| 6f 74 65 20 71 75 65 72 | 79 2d 72 65 70 6c 61 63 |ote quer|y-replac|
|00001100| 65 2d 68 69 73 74 6f 72 | 79 29 29 29 20 28 6c 69 |e-histor|y))) (li|
|00001110| 73 74 20 66 72 6f 6d 20 | 74 6f 20 63 75 72 72 65 |st from |to curre|
|00001120| 6e 74 2d 70 72 65 66 69 | 78 2d 61 72 67 29 29 5d |nt-prefi|x-arg))]|
|00001130| 29 0a 23 40 38 33 36 20 | 52 65 70 6c 61 63 65 20 |).#@836 |Replace |
|00001140| 6f 63 63 75 72 72 65 6e | 63 65 73 20 6f 66 20 46 |occurren|ces of F|
|00001150| 52 4f 4d 2d 53 54 52 49 | 4e 47 20 77 69 74 68 20 |ROM-STRI|NG with |
|00001160| 54 4f 2d 53 54 52 49 4e | 47 2e 0a 50 72 65 73 65 |TO-STRIN|G..Prese|
|00001170| 72 76 65 20 63 61 73 65 | 20 69 6e 20 65 61 63 68 |rve case| in each|
|00001180| 20 6d 61 74 63 68 20 69 | 66 20 60 63 61 73 65 2d | match i|f `case-|
|00001190| 72 65 70 6c 61 63 65 27 | 20 61 6e 64 20 60 63 61 |replace'| and `ca|
|000011a0| 73 65 2d 66 6f 6c 64 2d | 73 65 61 72 63 68 27 0a |se-fold-|search'.|
|000011b0| 61 72 65 20 6e 6f 6e 2d | 6e 69 6c 20 61 6e 64 20 |are non-|nil and |
|000011c0| 46 52 4f 4d 2d 53 54 52 | 49 4e 47 20 68 61 73 20 |FROM-STR|ING has |
|000011d0| 6e 6f 20 75 70 70 65 72 | 63 61 73 65 20 6c 65 74 |no upper|case let|
|000011e0| 74 65 72 73 2e 0a 28 50 | 72 65 73 65 72 76 69 6e |ters..(P|reservin|
|000011f0| 67 20 63 61 73 65 20 6d | 65 61 6e 73 20 74 68 61 |g case m|eans tha|
|00001200| 74 20 69 66 20 74 68 65 | 20 73 74 72 69 6e 67 20 |t if the| string |
|00001210| 6d 61 74 63 68 65 64 20 | 69 73 20 61 6c 6c 20 63 |matched |is all c|
|00001220| 61 70 73 2c 20 6f 72 20 | 63 61 70 69 74 61 6c 69 |aps, or |capitali|
|00001230| 7a 65 64 2c 0a 74 68 65 | 6e 20 69 74 73 20 72 65 |zed,.the|n its re|
|00001240| 70 6c 61 63 65 6d 65 6e | 74 20 69 73 20 75 70 63 |placemen|t is upc|
|00001250| 61 73 65 64 20 6f 72 20 | 63 61 70 69 74 61 6c 69 |ased or |capitali|
|00001260| 7a 65 64 2e 29 0a 0a 54 | 68 69 72 64 20 61 72 67 |zed.)..T|hird arg|
|00001270| 20 44 45 4c 49 4d 49 54 | 45 44 20 28 70 72 65 66 | DELIMIT|ED (pref|
|00001280| 69 78 20 61 72 67 20 69 | 66 20 69 6e 74 65 72 61 |ix arg i|f intera|
|00001290| 63 74 69 76 65 29 2c 20 | 69 66 20 6e 6f 6e 2d 6e |ctive), |if non-n|
|000012a0| 69 6c 2c 20 6d 65 61 6e | 73 20 72 65 70 6c 61 63 |il, mean|s replac|
|000012b0| 65 0a 6f 6e 6c 79 20 6d | 61 74 63 68 65 73 20 73 |e.only m|atches s|
|000012c0| 75 72 72 6f 75 6e 64 65 | 64 20 62 79 20 77 6f 72 |urrounde|d by wor|
|000012d0| 64 20 62 6f 75 6e 64 61 | 72 69 65 73 2e 0a 0a 49 |d bounda|ries...I|
|000012e0| 66 20 60 71 75 65 72 79 | 2d 72 65 70 6c 61 63 65 |f `query|-replace|
|000012f0| 2d 69 6e 74 65 72 61 63 | 74 69 76 65 27 20 69 73 |-interac|tive' is|
|00001300| 20 6e 6f 6e 2d 6e 69 6c | 2c 20 74 68 65 20 6c 61 | non-nil|, the la|
|00001310| 73 74 20 69 6e 63 72 65 | 6d 65 6e 74 61 6c 20 73 |st incre|mental s|
|00001320| 65 61 72 63 68 0a 73 74 | 72 69 6e 67 20 69 73 20 |earch.st|ring is |
|00001330| 75 73 65 64 20 61 73 20 | 46 52 4f 4d 2d 53 54 52 |used as |FROM-STR|
|00001340| 49 4e 47 2d 2d 79 6f 75 | 20 64 6f 6e 27 74 20 68 |ING--you| don't h|
|00001350| 61 76 65 20 74 6f 20 73 | 70 65 63 69 66 79 20 69 |ave to s|pecify i|
|00001360| 74 20 77 69 74 68 20 74 | 68 65 0a 6d 69 6e 69 62 |t with t|he.minib|
|00001370| 75 66 66 65 72 2e 0a 0a | 54 68 69 73 20 66 75 6e |uffer...|This fun|
|00001380| 63 74 69 6f 6e 20 69 73 | 20 75 73 75 61 6c 6c 79 |ction is| usually|
|00001390| 20 74 68 65 20 77 72 6f | 6e 67 20 74 68 69 6e 67 | the wro|ng thing|
|000013a0| 20 74 6f 20 75 73 65 20 | 69 6e 20 61 20 4c 69 73 | to use |in a Lis|
|000013b0| 70 20 70 72 6f 67 72 61 | 6d 2e 0a 57 68 61 74 20 |p progra|m..What |
|000013c0| 79 6f 75 20 70 72 6f 62 | 61 62 6c 79 20 77 61 6e |you prob|ably wan|
|000013d0| 74 20 69 73 20 61 20 6c | 6f 6f 70 20 6c 69 6b 65 |t is a l|oop like|
|000013e0| 20 74 68 69 73 3a 0a 20 | 20 28 77 68 69 6c 65 20 | this:. | (while |
|000013f0| 28 73 65 61 72 63 68 2d | 66 6f 72 77 61 72 64 20 |(search-|forward |
|00001400| 46 52 4f 4d 2d 53 54 52 | 49 4e 47 20 6e 69 6c 20 |FROM-STR|ING nil |
|00001410| 74 29 0a 20 20 20 20 28 | 72 65 70 6c 61 63 65 2d |t). (|replace-|
|00001420| 6d 61 74 63 68 20 54 4f | 2d 53 54 52 49 4e 47 20 |match TO|-STRING |
|00001430| 6e 69 6c 20 74 29 29 0a | 77 68 69 63 68 20 77 69 |nil t)).|which wi|
|00001440| 6c 6c 20 72 75 6e 20 66 | 61 73 74 65 72 20 61 6e |ll run f|aster an|
|00001450| 64 20 77 69 6c 6c 20 6e | 6f 74 20 73 65 74 20 74 |d will n|ot set t|
|00001460| 68 65 20 6d 61 72 6b 20 | 6f 72 20 70 72 69 6e 74 |he mark |or print|
|00001470| 20 61 6e 79 74 68 69 6e | 67 2e 1f 0a 28 64 65 66 | anythin|g...(def|
|00001480| 61 6c 69 61 73 20 27 72 | 65 70 6c 61 63 65 2d 73 |alias 'r|eplace-s|
|00001490| 74 72 69 6e 67 20 23 5b | 28 66 72 6f 6d 2d 73 74 |tring #[|(from-st|
|000014a0| 72 69 6e 67 20 74 6f 2d | 73 74 72 69 6e 67 20 26 |ring to-|string &|
|000014b0| 6f 70 74 69 6f 6e 61 6c | 20 64 65 6c 69 6d 69 74 |optional| delimit|
|000014c0| 65 64 29 20 22 c0 09 5c | 6e c3 89 5c 66 25 87 22 |ed) "..\|n..\f%."|
|000014d0| 20 5b 70 65 72 66 6f 72 | 6d 2d 72 65 70 6c 61 63 | [perfor|m-replac|
|000014e0| 65 20 66 72 6f 6d 2d 73 | 74 72 69 6e 67 20 74 6f |e from-s|tring to|
|000014f0| 2d 73 74 72 69 6e 67 20 | 6e 69 6c 20 64 65 6c 69 |-string |nil deli|
|00001500| 6d 69 74 65 64 5d 20 36 | 20 28 23 24 20 2e 20 34 |mited] 6| (#$ . 4|
|00001510| 34 30 38 29 20 28 71 75 | 65 72 79 2d 72 65 70 6c |408) (qu|ery-repl|
|00001520| 61 63 65 2d 72 65 61 64 | 2d 61 72 67 73 20 22 52 |ace-read|-args "R|
|00001530| 65 70 6c 61 63 65 20 73 | 74 72 69 6e 67 22 20 6e |eplace s|tring" n|
|00001540| 69 6c 29 5d 29 0a 23 40 | 38 36 38 20 52 65 70 6c |il)]).#@|868 Repl|
|00001550| 61 63 65 20 74 68 69 6e | 67 73 20 61 66 74 65 72 |ace thin|gs after|
|00001560| 20 70 6f 69 6e 74 20 6d | 61 74 63 68 69 6e 67 20 | point m|atching |
|00001570| 52 45 47 45 58 50 20 77 | 69 74 68 20 54 4f 2d 53 |REGEXP w|ith TO-S|
|00001580| 54 52 49 4e 47 2e 0a 50 | 72 65 73 65 72 76 65 20 |TRING..P|reserve |
|00001590| 63 61 73 65 20 69 6e 20 | 65 61 63 68 20 6d 61 74 |case in |each mat|
|000015a0| 63 68 20 69 66 20 60 63 | 61 73 65 2d 72 65 70 6c |ch if `c|ase-repl|
|000015b0| 61 63 65 27 20 61 6e 64 | 20 60 63 61 73 65 2d 66 |ace' and| `case-f|
|000015c0| 6f 6c 64 2d 73 65 61 72 | 63 68 27 0a 61 72 65 20 |old-sear|ch'.are |
|000015d0| 6e 6f 6e 2d 6e 69 6c 20 | 61 6e 64 20 52 45 47 45 |non-nil |and REGE|
|000015e0| 58 50 20 68 61 73 20 6e | 6f 20 75 70 70 65 72 63 |XP has n|o upperc|
|000015f0| 61 73 65 20 6c 65 74 74 | 65 72 73 2e 0a 54 68 69 |ase lett|ers..Thi|
|00001600| 72 64 20 61 72 67 20 44 | 45 4c 49 4d 49 54 45 44 |rd arg D|ELIMITED|
|00001610| 20 28 70 72 65 66 69 78 | 20 61 72 67 20 69 66 20 | (prefix| arg if |
|00001620| 69 6e 74 65 72 61 63 74 | 69 76 65 29 2c 20 69 66 |interact|ive), if|
|00001630| 20 6e 6f 6e 2d 6e 69 6c | 2c 20 6d 65 61 6e 73 20 | non-nil|, means |
|00001640| 72 65 70 6c 61 63 65 0a | 6f 6e 6c 79 20 6d 61 74 |replace.|only mat|
|00001650| 63 68 65 73 20 73 75 72 | 72 6f 75 6e 64 65 64 20 |ches sur|rounded |
|00001660| 62 79 20 77 6f 72 64 20 | 62 6f 75 6e 64 61 72 69 |by word |boundari|
|00001670| 65 73 2e 0a 49 6e 20 54 | 4f 2d 53 54 52 49 4e 47 |es..In T|O-STRING|
|00001680| 2c 20 60 5c 26 27 20 73 | 74 61 6e 64 73 20 66 6f |, `\&' s|tands fo|
|00001690| 72 20 77 68 61 74 65 76 | 65 72 20 6d 61 74 63 68 |r whatev|er match|
|000016a0| 65 64 20 74 68 65 20 77 | 68 6f 6c 65 20 6f 66 20 |ed the w|hole of |
|000016b0| 52 45 47 45 58 50 2c 0a | 61 6e 64 20 60 5c 3d 5c |REGEXP,.|and `\=\|
|000016c0| 4e 27 20 28 77 68 65 72 | 65 20 4e 20 69 73 20 61 |N' (wher|e N is a|
|000016d0| 20 64 69 67 69 74 29 20 | 73 74 61 6e 64 73 20 66 | digit) |stands f|
|000016e0| 6f 72 0a 20 77 68 61 74 | 65 76 65 72 20 77 68 61 |or. what|ever wha|
|000016f0| 74 20 6d 61 74 63 68 65 | 64 20 74 68 65 20 4e 74 |t matche|d the Nt|
|00001700| 68 20 60 5c 28 2e 2e 2e | 5c 29 27 20 69 6e 20 52 |h `\(...|\)' in R|
|00001710| 45 47 45 58 50 2e 0a 0a | 49 66 20 60 71 75 65 72 |EGEXP...|If `quer|
|00001720| 79 2d 72 65 70 6c 61 63 | 65 2d 69 6e 74 65 72 61 |y-replac|e-intera|
|00001730| 63 74 69 76 65 27 20 69 | 73 20 6e 6f 6e 2d 6e 69 |ctive' i|s non-ni|
|00001740| 6c 2c 20 74 68 65 20 6c | 61 73 74 20 69 6e 63 72 |l, the l|ast incr|
|00001750| 65 6d 65 6e 74 61 6c 20 | 73 65 61 72 63 68 0a 72 |emental |search.r|
|00001760| 65 67 65 78 70 20 69 73 | 20 75 73 65 64 20 61 73 |egexp is| used as|
|00001770| 20 52 45 47 45 58 50 2d | 2d 79 6f 75 20 64 6f 6e | REGEXP-|-you don|
|00001780| 27 74 20 68 61 76 65 20 | 74 6f 20 73 70 65 63 69 |'t have |to speci|
|00001790| 66 79 20 69 74 20 77 69 | 74 68 20 74 68 65 20 6d |fy it wi|th the m|
|000017a0| 69 6e 69 62 75 66 66 65 | 72 2e 0a 0a 54 68 69 73 |inibuffe|r...This|
|000017b0| 20 66 75 6e 63 74 69 6f | 6e 20 69 73 20 75 73 75 | functio|n is usu|
|000017c0| 61 6c 6c 79 20 74 68 65 | 20 77 72 6f 6e 67 20 74 |ally the| wrong t|
|000017d0| 68 69 6e 67 20 74 6f 20 | 75 73 65 20 69 6e 20 61 |hing to |use in a|
|000017e0| 20 4c 69 73 70 20 70 72 | 6f 67 72 61 6d 2e 0a 57 | Lisp pr|ogram..W|
|000017f0| 68 61 74 20 79 6f 75 20 | 70 72 6f 62 61 62 6c 79 |hat you |probably|
|00001800| 20 77 61 6e 74 20 69 73 | 20 61 20 6c 6f 6f 70 20 | want is| a loop |
|00001810| 6c 69 6b 65 20 74 68 69 | 73 3a 0a 20 20 28 77 68 |like thi|s:. (wh|
|00001820| 69 6c 65 20 28 72 65 2d | 73 65 61 72 63 68 2d 66 |ile (re-|search-f|
|00001830| 6f 72 77 61 72 64 20 52 | 45 47 45 58 50 20 6e 69 |orward R|EGEXP ni|
|00001840| 6c 20 74 29 0a 20 20 20 | 20 28 72 65 70 6c 61 63 |l t). | (replac|
|00001850| 65 2d 6d 61 74 63 68 20 | 54 4f 2d 53 54 52 49 4e |e-match |TO-STRIN|
|00001860| 47 20 6e 69 6c 20 6e 69 | 6c 29 29 0a 77 68 69 63 |G nil ni|l)).whic|
|00001870| 68 20 77 69 6c 6c 20 72 | 75 6e 20 66 61 73 74 65 |h will r|un faste|
|00001880| 72 20 61 6e 64 20 77 69 | 6c 6c 20 6e 6f 74 20 73 |r and wi|ll not s|
|00001890| 65 74 20 74 68 65 20 6d | 61 72 6b 20 6f 72 20 70 |et the m|ark or p|
|000018a0| 72 69 6e 74 20 61 6e 79 | 74 68 69 6e 67 2e 1f 0a |rint any|thing...|
|000018b0| 28 64 65 66 61 6c 69 61 | 73 20 27 72 65 70 6c 61 |(defalia|s 'repla|
|000018c0| 63 65 2d 72 65 67 65 78 | 70 20 23 5b 28 72 65 67 |ce-regex|p #[(reg|
|000018d0| 65 78 70 20 74 6f 2d 73 | 74 72 69 6e 67 20 26 6f |exp to-s|tring &o|
|000018e0| 70 74 69 6f 6e 61 6c 20 | 64 65 6c 69 6d 69 74 65 |ptional |delimite|
|000018f0| 64 29 20 22 c0 09 5c 6e | c3 c4 0d 25 87 22 20 5b |d) "..\n|...%." [|
|00001900| 70 65 72 66 6f 72 6d 2d | 72 65 70 6c 61 63 65 20 |perform-|replace |
|00001910| 72 65 67 65 78 70 20 74 | 6f 2d 73 74 72 69 6e 67 |regexp t|o-string|
|00001920| 20 6e 69 6c 20 74 20 64 | 65 6c 69 6d 69 74 65 64 | nil t d|elimited|
|00001930| 5d 20 36 20 28 23 24 20 | 2e 20 35 34 35 32 29 20 |] 6 (#$ |. 5452) |
|00001940| 28 71 75 65 72 79 2d 72 | 65 70 6c 61 63 65 2d 72 |(query-r|eplace-r|
|00001950| 65 61 64 2d 61 72 67 73 | 20 22 52 65 70 6c 61 63 |ead-args| "Replac|
|00001960| 65 20 72 65 67 65 78 70 | 22 20 74 29 5d 29 0a 23 |e regexp|" t)]).#|
|00001970| 40 36 33 20 48 69 73 74 | 6f 72 79 20 6c 69 73 74 |@63 Hist|ory list|
|00001980| 20 66 6f 72 20 73 6f 6d | 65 20 63 6f 6d 6d 61 6e | for som|e comman|
|00001990| 64 73 20 74 68 61 74 20 | 72 65 61 64 20 72 65 67 |ds that |read reg|
|000019a0| 75 6c 61 72 20 65 78 70 | 72 65 73 73 69 6f 6e 73 |ular exp|ressions|
|000019b0| 2e 1f 0a 28 64 65 66 76 | 61 72 20 72 65 67 65 78 |...(defv|ar regex|
|000019c0| 70 2d 68 69 73 74 6f 72 | 79 20 6e 69 6c 20 28 23 |p-histor|y nil (#|
|000019d0| 24 20 2e 20 36 35 31 36 | 29 29 0a 28 64 65 66 61 |$ . 6516|)).(defa|
|000019e0| 6c 69 61 73 20 28 71 75 | 6f 74 65 20 64 65 6c 65 |lias (qu|ote dele|
|000019f0| 74 65 2d 6e 6f 6e 2d 6d | 61 74 63 68 69 6e 67 2d |te-non-m|atching-|
|00001a00| 6c 69 6e 65 73 29 20 28 | 71 75 6f 74 65 20 6b 65 |lines) (|quote ke|
|00001a10| 65 70 2d 6c 69 6e 65 73 | 29 29 0a 23 40 31 35 39 |ep-lines|)).#@159|
|00001a20| 20 44 65 6c 65 74 65 20 | 61 6c 6c 20 6c 69 6e 65 | Delete |all line|
|00001a30| 73 20 65 78 63 65 70 74 | 20 74 68 6f 73 65 20 63 |s except| those c|
|00001a40| 6f 6e 74 61 69 6e 69 6e | 67 20 6d 61 74 63 68 65 |ontainin|g matche|
|00001a50| 73 20 66 6f 72 20 52 45 | 47 45 58 50 2e 0a 41 20 |s for RE|GEXP..A |
|00001a60| 6d 61 74 63 68 20 73 70 | 6c 69 74 20 61 63 72 6f |match sp|lit acro|
|00001a70| 73 73 20 6c 69 6e 65 73 | 20 70 72 65 73 65 72 76 |ss lines| preserv|
|00001a80| 65 73 20 61 6c 6c 20 74 | 68 65 20 6c 69 6e 65 73 |es all t|he lines|
|00001a90| 20 69 74 20 6c 69 65 73 | 20 69 6e 2e 0a 41 70 70 | it lies| in..App|
|00001aa0| 6c 69 65 73 20 74 6f 20 | 61 6c 6c 20 6c 69 6e 65 |lies to |all line|
|00001ab0| 73 20 61 66 74 65 72 20 | 70 6f 69 6e 74 2e 1f 0a |s after |point...|
|00001ac0| 28 64 65 66 61 6c 69 61 | 73 20 27 6b 65 65 70 2d |(defalia|s 'keep-|
|00001ad0| 6c 69 6e 65 73 20 23 5b | 28 72 65 67 65 78 70 29 |lines #[|(regexp)|
|00001ae0| 20 22 8a 6e 84 08 00 c0 | 79 88 60 19 6d 3f 85 50 | ".n....|y.`.m?.P|
|00001af0| 00 c2 0b c4 c5 23 84 1e | 00 09 64 7c 88 82 37 00 |.....#..|..d|..7.|
|00001b00| 8a c6 94 62 88 c6 79 88 | 60 29 1e 07 09 0e 07 57 |...b..y.|`).....W|
|00001b10| 83 36 00 09 0e 07 7c 88 | 29 8a c0 79 88 60 29 11 |.6....|.|)..y.`).|
|00001b20| 6d 84 5c 6e 00 c6 94 c6 | 95 55 83 5c 6e 00 c0 75 |m.\n....|.U.\n..u|
|00001b30| 88 82 5c 6e 00 2a 87 22 | 20 5b 31 20 73 74 61 72 |..\n.*."| [1 star|
|00001b40| 74 20 72 65 2d 73 65 61 | 72 63 68 2d 66 6f 72 77 |t re-sea|rch-forw|
|00001b50| 61 72 64 20 72 65 67 65 | 78 70 20 6e 69 6c 20 6d |ard rege|xp nil m|
|00001b60| 6f 76 65 20 30 20 65 6e | 64 5d 20 34 20 28 23 24 |ove 0 en|d] 4 (#$|
|00001b70| 20 2e 20 36 36 38 39 29 | 20 28 6c 69 73 74 20 28 | . 6689)| (list (|
|00001b80| 72 65 61 64 2d 66 72 6f | 6d 2d 6d 69 6e 69 62 75 |read-fro|m-minibu|
|00001b90| 66 66 65 72 20 22 4b 65 | 65 70 20 6c 69 6e 65 73 |ffer "Ke|ep lines|
|00001ba0| 20 28 63 6f 6e 74 61 69 | 6e 69 6e 67 20 6d 61 74 | (contai|ning mat|
|00001bb0| 63 68 20 66 6f 72 20 72 | 65 67 65 78 70 29 3a 20 |ch for r|egexp): |
|00001bc0| 22 20 6e 69 6c 20 6e 69 | 6c 20 6e 69 6c 20 28 71 |" nil ni|l nil (q|
|00001bd0| 75 6f 74 65 20 72 65 67 | 65 78 70 2d 68 69 73 74 |uote reg|exp-hist|
|00001be0| 6f 72 79 29 29 29 5d 29 | 0a 28 64 65 66 61 6c 69 |ory)))])|.(defali|
|00001bf0| 61 73 20 28 71 75 6f 74 | 65 20 64 65 6c 65 74 65 |as (quot|e delete|
|00001c00| 2d 6d 61 74 63 68 69 6e | 67 2d 6c 69 6e 65 73 29 |-matchin|g-lines)|
|00001c10| 20 28 71 75 6f 74 65 20 | 66 6c 75 73 68 2d 6c 69 | (quote |flush-li|
|00001c20| 6e 65 73 29 29 0a 23 40 | 31 34 37 20 44 65 6c 65 |nes)).#@|147 Dele|
|00001c30| 74 65 20 6c 69 6e 65 73 | 20 63 6f 6e 74 61 69 6e |te lines| contain|
|00001c40| 69 6e 67 20 6d 61 74 63 | 68 65 73 20 66 6f 72 20 |ing matc|hes for |
|00001c50| 52 45 47 45 58 50 2e 0a | 49 66 20 61 20 6d 61 74 |REGEXP..|If a mat|
|00001c60| 63 68 20 69 73 20 73 70 | 6c 69 74 20 61 63 72 6f |ch is sp|lit acro|
|00001c70| 73 73 20 6c 69 6e 65 73 | 2c 20 61 6c 6c 20 74 68 |ss lines|, all th|
|00001c80| 65 20 6c 69 6e 65 73 20 | 69 74 20 6c 69 65 73 20 |e lines |it lies |
|00001c90| 69 6e 20 61 72 65 20 64 | 65 6c 65 74 65 64 2e 0a |in are d|eleted..|
|00001ca0| 41 70 70 6c 69 65 73 20 | 74 6f 20 6c 69 6e 65 73 |Applies |to lines|
|00001cb0| 20 61 66 74 65 72 20 70 | 6f 69 6e 74 2e 1f 0a 28 | after p|oint...(|
|00001cc0| 64 65 66 61 6c 69 61 73 | 20 27 66 6c 75 73 68 2d |defalias| 'flush-|
|00001cd0| 6c 69 6e 65 73 20 23 5b | 28 72 65 67 65 78 70 29 |lines #[|(regexp)|
|00001ce0| 20 22 8a 6d 3f 85 21 00 | c0 09 c2 c3 23 85 21 00 | ".m?.!.|....#.!.|
|00001cf0| 8a c4 94 62 88 c4 79 88 | 60 29 c5 79 88 60 7c 88 |...b..y.|`).y.`|.|
|00001d00| 82 01 00 29 87 22 20 5b | 72 65 2d 73 65 61 72 63 |...)." [|re-searc|
|00001d10| 68 2d 66 6f 72 77 61 72 | 64 20 72 65 67 65 78 70 |h-forwar|d regexp|
|00001d20| 20 6e 69 6c 20 74 20 30 | 20 31 5d 20 34 20 28 23 | nil t 0| 1] 4 (#|
|00001d30| 24 20 2e 20 37 32 31 32 | 29 20 28 6c 69 73 74 20 |$ . 7212|) (list |
|00001d40| 28 72 65 61 64 2d 66 72 | 6f 6d 2d 6d 69 6e 69 62 |(read-fr|om-minib|
|00001d50| 75 66 66 65 72 20 22 46 | 6c 75 73 68 20 6c 69 6e |uffer "F|lush lin|
|00001d60| 65 73 20 28 63 6f 6e 74 | 61 69 6e 69 6e 67 20 6d |es (cont|aining m|
|00001d70| 61 74 63 68 20 66 6f 72 | 20 72 65 67 65 78 70 29 |atch for| regexp)|
|00001d80| 3a 20 22 20 6e 69 6c 20 | 6e 69 6c 20 6e 69 6c 20 |: " nil |nil nil |
|00001d90| 28 71 75 6f 74 65 20 72 | 65 67 65 78 70 2d 68 69 |(quote r|egexp-hi|
|00001da0| 73 74 6f 72 79 29 29 29 | 5d 29 0a 28 64 65 66 61 |story)))|]).(defa|
|00001db0| 6c 69 61 73 20 28 71 75 | 6f 74 65 20 63 6f 75 6e |lias (qu|ote coun|
|00001dc0| 74 2d 6d 61 74 63 68 65 | 73 29 20 28 71 75 6f 74 |t-matche|s) (quot|
|00001dd0| 65 20 68 6f 77 2d 6d 61 | 6e 79 29 29 0a 23 40 35 |e how-ma|ny)).#@5|
|00001de0| 33 20 50 72 69 6e 74 20 | 6e 75 6d 62 65 72 20 6f |3 Print |number o|
|00001df0| 66 20 6d 61 74 63 68 65 | 73 20 66 6f 72 20 52 45 |f matche|s for RE|
|00001e00| 47 45 58 50 20 66 6f 6c | 6c 6f 77 69 6e 67 20 70 |GEXP fol|lowing p|
|00001e10| 6f 69 6e 74 2e 1f 0a 28 | 64 65 66 61 6c 69 61 73 |oint...(|defalias|
|00001e20| 20 27 68 6f 77 2d 6d 61 | 6e 79 20 23 5b 28 72 65 | 'how-ma|ny #[(re|
|00001e30| 67 65 78 70 29 20 22 c0 | c1 1a 1b 8a 6d 84 25 00 |gexp) ".|....m.%.|
|00001e40| 60 12 c4 0d c1 c6 23 83 | 25 00 5c 6e 60 55 83 1f |`.....#.|%.\n`U..|
|00001e50| 00 c7 75 88 82 05 00 0b | 54 13 82 05 00 c8 c9 0b |..u.....|T.......|
|00001e60| 5c 22 2b 87 22 20 5b 30 | 20 6e 69 6c 20 6f 70 6f |\"+." [0| nil opo|
|00001e70| 69 6e 74 20 63 6f 75 6e | 74 20 72 65 2d 73 65 61 |int coun|t re-sea|
|00001e80| 72 63 68 2d 66 6f 72 77 | 61 72 64 20 72 65 67 65 |rch-forw|ard rege|
|00001e90| 78 70 20 74 20 31 20 6d | 65 73 73 61 67 65 20 22 |xp t 1 m|essage "|
|00001ea0| 25 64 20 6f 63 63 75 72 | 72 65 6e 63 65 73 22 5d |%d occur|rences"]|
|00001eb0| 20 34 20 28 23 24 20 2e | 20 37 36 35 30 29 20 28 | 4 (#$ .| 7650) (|
|00001ec0| 6c 69 73 74 20 28 72 65 | 61 64 2d 66 72 6f 6d 2d |list (re|ad-from-|
|00001ed0| 6d 69 6e 69 62 75 66 66 | 65 72 20 22 48 6f 77 20 |minibuff|er "How |
|00001ee0| 6d 61 6e 79 20 6d 61 74 | 63 68 65 73 20 66 6f 72 |many mat|ches for|
|00001ef0| 20 28 72 65 67 65 78 70 | 29 3a 20 22 20 6e 69 6c | (regexp|): " nil|
|00001f00| 20 6e 69 6c 20 6e 69 6c | 20 28 71 75 6f 74 65 20 | nil nil| (quote |
|00001f10| 72 65 67 65 78 70 2d 68 | 69 73 74 6f 72 79 29 29 |regexp-h|istory))|
|00001f20| 29 5d 29 0a 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |)]).(byt|e-code "|
|00001f30| c0 c1 21 84 08 00 c2 11 | c1 0b 42 13 09 84 25 00 |..!.....|..B...%.|
|00001f40| c4 20 11 c5 09 c6 c7 23 | 88 c5 09 c8 c9 23 88 c5 |. .....#|.....#..|
|00001f50| 09 ca c9 23 88 c0 cb 21 | 84 2e 00 c2 16 0b cb 0b |...#...!|........|
|00001f60| 42 13 c0 cc 21 84 3b 00 | c2 16 5c 66 cc 0b 42 13 |B...!.;.|..\f..B.|
|00001f70| c0 cd 21 84 48 00 c2 16 | 0d cd 0b 42 13 c2 87 22 |..!.H...|...B..."|
|00001f80| 20 5b 62 6f 75 6e 64 70 | 20 6f 63 63 75 72 2d 6d | [boundp| occur-m|
|00001f90| 6f 64 65 2d 6d 61 70 20 | 6e 69 6c 20 63 75 72 72 |ode-map |nil curr|
|00001fa0| 65 6e 74 2d 6c 6f 61 64 | 2d 6c 69 73 74 20 6d 61 |ent-load|-list ma|
|00001fb0| 6b 65 2d 73 70 61 72 73 | 65 2d 6b 65 79 6d 61 70 |ke-spars|e-keymap|
|00001fc0| 20 64 65 66 69 6e 65 2d | 6b 65 79 20 5b 6d 6f 75 | define-|key [mou|
|00001fd0| 73 65 2d 32 5d 20 6f 63 | 63 75 72 2d 6d 6f 64 65 |se-2] oc|cur-mode|
|00001fe0| 2d 6d 6f 75 73 65 2d 67 | 6f 74 6f 20 22 03 03 22 |-mouse-g|oto ".."|
|00001ff0| 20 6f 63 63 75 72 2d 6d | 6f 64 65 2d 67 6f 74 6f | occur-m|ode-goto|
|00002000| 2d 6f 63 63 75 72 72 65 | 6e 63 65 20 22 0d 22 20 |-occurre|nce "." |
|00002010| 6f 63 63 75 72 2d 62 75 | 66 66 65 72 20 6f 63 63 |occur-bu|ffer occ|
|00002020| 75 72 2d 6e 6c 69 6e 65 | 73 20 6f 63 63 75 72 2d |ur-nline|s occur-|
|00002030| 70 6f 73 2d 6c 69 73 74 | 5d 20 34 29 0a 23 40 32 |pos-list|] 4).#@2|
|00002040| 37 39 20 4d 61 6a 6f 72 | 20 6d 6f 64 65 20 66 6f |79 Major| mode fo|
|00002050| 72 20 6f 75 74 70 75 74 | 20 66 72 6f 6d 20 5c 5b |r output| from \[|
|00002060| 6f 63 63 75 72 5d 2e 0a | 5c 3c 6f 63 63 75 72 2d |occur]..|\<occur-|
|00002070| 6d 6f 64 65 2d 6d 61 70 | 3e 4d 6f 76 65 20 70 6f |mode-map|>Move po|
|00002080| 69 6e 74 20 74 6f 20 6f | 6e 65 20 6f 66 20 74 68 |int to o|ne of th|
|00002090| 65 20 69 74 65 6d 73 20 | 69 6e 20 74 68 69 73 20 |e items |in this |
|000020a0| 62 75 66 66 65 72 2c 20 | 74 68 65 6e 20 75 73 65 |buffer, |then use|
|000020b0| 0a 5c 5b 6f 63 63 75 72 | 2d 6d 6f 64 65 2d 67 6f |.\[occur|-mode-go|
|000020c0| 74 6f 2d 6f 63 63 75 72 | 72 65 6e 63 65 5d 20 74 |to-occur|rence] t|
|000020d0| 6f 20 67 6f 20 74 6f 20 | 74 68 65 20 6f 63 63 75 |o go to |the occu|
|000020e0| 72 72 65 6e 63 65 20 74 | 68 61 74 20 74 68 65 20 |rrence t|hat the |
|000020f0| 69 74 65 6d 20 72 65 66 | 65 72 73 20 74 6f 2e 0a |item ref|ers to..|
|00002100| 41 6c 74 65 72 6e 61 74 | 69 76 65 6c 79 2c 20 63 |Alternat|ively, c|
|00002110| 6c 69 63 6b 20 5c 5b 6f | 63 63 75 72 2d 6d 6f 64 |lick \[o|ccur-mod|
|00002120| 65 2d 6d 6f 75 73 65 2d | 67 6f 74 6f 5d 20 6f 6e |e-mouse-|goto] on|
|00002130| 20 61 6e 20 69 74 65 6d | 20 74 6f 20 67 6f 20 74 | an item| to go t|
|00002140| 6f 20 69 74 2e 0a 0a 5c | 7b 6f 63 63 75 72 2d 6d |o it...\|{occur-m|
|00002150| 6f 64 65 2d 6d 61 70 7d | 1f 0a 28 64 65 66 61 6c |ode-map}|..(defal|
|00002160| 69 61 73 20 27 6f 63 63 | 75 72 2d 6d 6f 64 65 20 |ias 'occ|ur-mode |
|00002170| 23 5b 6e 69 6c 20 22 c0 | 20 88 c1 5c 6e 21 88 c3 |#[nil ".| ..\n!..|
|00002180| 14 c5 16 06 c7 c8 21 88 | c7 c9 21 88 c7 ca 21 88 |......!.|..!...!.|
|00002190| cb cc 21 87 22 20 5b 6b | 69 6c 6c 2d 61 6c 6c 2d |..!." [k|ill-all-|
|000021a0| 6c 6f 63 61 6c 2d 76 61 | 72 69 61 62 6c 65 73 20 |local-va|riables |
|000021b0| 75 73 65 2d 6c 6f 63 61 | 6c 2d 6d 61 70 20 6f 63 |use-loca|l-map oc|
|000021c0| 63 75 72 2d 6d 6f 64 65 | 2d 6d 61 70 20 6f 63 63 |cur-mode|-map occ|
|000021d0| 75 72 2d 6d 6f 64 65 20 | 6d 61 6a 6f 72 2d 6d 6f |ur-mode |major-mo|
|000021e0| 64 65 20 22 4f 63 63 75 | 72 22 20 6d 6f 64 65 2d |de "Occu|r" mode-|
|000021f0| 6e 61 6d 65 20 6d 61 6b | 65 2d 6c 6f 63 61 6c 2d |name mak|e-local-|
|00002200| 76 61 72 69 61 62 6c 65 | 20 6f 63 63 75 72 2d 62 |variable| occur-b|
|00002210| 75 66 66 65 72 20 6f 63 | 63 75 72 2d 6e 6c 69 6e |uffer oc|cur-nlin|
|00002220| 65 73 20 6f 63 63 75 72 | 2d 70 6f 73 2d 6c 69 73 |es occur|-pos-lis|
|00002230| 74 20 72 75 6e 2d 68 6f | 6f 6b 73 20 6f 63 63 75 |t run-ho|oks occu|
|00002240| 72 2d 6d 6f 64 65 2d 68 | 6f 6f 6b 5d 20 32 20 28 |r-mode-h|ook] 2 (|
|00002250| 23 24 20 2e 20 38 32 35 | 39 29 5d 29 0a 23 40 36 |#$ . 825|9)]).#@6|
|00002260| 32 20 49 6e 20 4f 63 63 | 75 72 20 6d 6f 64 65 2c |2 In Occ|ur mode,|
|00002270| 20 67 6f 20 74 6f 20 74 | 68 65 20 6f 63 63 75 72 | go to t|he occur|
|00002280| 72 65 6e 63 65 20 77 68 | 6f 73 65 20 6c 69 6e 65 |rence wh|ose line|
|00002290| 20 79 6f 75 20 63 6c 69 | 63 6b 20 6f 6e 2e 1f 0a | you cli|ck on...|
|000022a0| 28 64 65 66 61 6c 69 61 | 73 20 27 6f 63 63 75 72 |(defalia|s 'occur|
|000022b0| 2d 6d 6f 64 65 2d 6d 6f | 75 73 65 2d 67 6f 74 6f |-mode-mo|use-goto|
|000022c0| 20 23 5b 28 65 76 65 6e | 74 29 20 22 c0 89 19 1a | #[(even|t) "....|
|000022d0| 8a c3 5c 66 1c c5 5c 66 | 38 3a 83 13 00 c5 82 14 |..\f..\f|8:......|
|000022e0| 00 c6 5c 66 38 29 89 1e | 07 40 29 21 71 88 8a 5c |..\f8)..|.@)!q..\|
|000022f0| 66 1c c5 5c 66 38 3a 83 | 2d 00 c5 82 2e 00 c6 5c |f..\f8:.|-......\|
|00002300| 66 38 29 89 1e 07 41 40 | 3a 83 42 00 0e 07 41 40 |f8)...A@|:.B...A@|
|00002310| 40 82 46 00 0e 07 41 40 | 29 62 88 c8 20 11 0e 09 |@.F...A@|)b.. ...|
|00002320| 12 2a ca 5c 6e 21 88 cb | 09 21 62 2a 87 22 20 5b |.*.\n!..|.!b*." [|
|00002330| 6e 69 6c 20 70 6f 73 20 | 62 75 66 66 65 72 20 77 |nil pos |buffer w|
|00002340| 69 6e 64 6f 77 2d 62 75 | 66 66 65 72 20 65 76 65 |indow-bu|ffer eve|
|00002350| 6e 74 20 32 20 31 20 70 | 6f 73 69 74 69 6f 6e 20 |nt 2 1 p|osition |
|00002360| 6f 63 63 75 72 2d 6d 6f | 64 65 2d 66 69 6e 64 2d |occur-mo|de-find-|
|00002370| 6f 63 63 75 72 72 65 6e | 63 65 20 6f 63 63 75 72 |occurren|ce occur|
|00002380| 2d 62 75 66 66 65 72 20 | 70 6f 70 2d 74 6f 2d 62 |-buffer |pop-to-b|
|00002390| 75 66 66 65 72 20 6d 61 | 72 6b 65 72 2d 70 6f 73 |uffer ma|rker-pos|
|000023a0| 69 74 69 6f 6e 5d 20 34 | 20 28 23 24 20 2e 20 38 |ition] 4| (#$ . 8|
|000023b0| 38 30 32 29 20 22 65 22 | 5d 29 0a 28 64 65 66 61 |802) "e"|]).(defa|
|000023c0| 6c 69 61 73 20 27 6f 63 | 63 75 72 2d 6d 6f 64 65 |lias 'oc|cur-mode|
|000023d0| 2d 66 69 6e 64 2d 6f 63 | 63 75 72 72 65 6e 63 65 |-find-oc|currence|
|000023e0| 20 23 5b 6e 69 6c 20 22 | 08 83 5c 6e 00 c1 08 21 | #[nil "|..\n...!|
|000023f0| 84 12 00 c2 10 c2 13 c4 | c5 21 88 c6 65 8a c7 79 |........|.!..e..y|
|00002400| 88 60 29 5c 22 1e 08 8a | c7 79 88 0e 08 53 0e 09 |.`)\"...|.y...S..|
|00002410| c7 57 83 32 00 ca 0e 09 | 5a 82 43 00 0e 09 c7 56 |.W.2....|Z.C....V|
|00002420| 83 42 00 0e 09 89 5c 5c | ca 5c 5c 82 43 00 cb a5 |.B....\\|.\\.C...|
|00002430| 29 89 1e 5c 66 0b 38 1e | 0d 0e 08 cb 57 83 57 00 |)..\f.8.|....W.W.|
|00002440| c4 ce 21 88 0e 0d 84 60 | 00 c4 ce 21 88 0e 0d 2b |..!....`|...!...+|
|00002450| 87 22 20 5b 6f 63 63 75 | 72 2d 62 75 66 66 65 72 |." [occu|r-buffer|
|00002460| 20 62 75 66 66 65 72 2d | 6e 61 6d 65 20 6e 69 6c | buffer-|name nil|
|00002470| 20 6f 63 63 75 72 2d 70 | 6f 73 2d 6c 69 73 74 20 | occur-p|os-list |
|00002480| 65 72 72 6f 72 20 22 42 | 75 66 66 65 72 20 69 6e |error "B|uffer in|
|00002490| 20 77 68 69 63 68 20 6f | 63 63 75 72 72 65 6e 63 | which o|ccurrenc|
|000024a0| 65 73 20 77 65 72 65 20 | 66 6f 75 6e 64 20 69 73 |es were |found is|
|000024b0| 20 64 65 6c 65 74 65 64 | 22 20 63 6f 75 6e 74 2d | deleted|" count-|
|000024c0| 6c 69 6e 65 73 20 30 20 | 6c 69 6e 65 2d 63 6f 75 |lines 0 |line-cou|
|000024d0| 6e 74 20 6f 63 63 75 72 | 2d 6e 6c 69 6e 65 73 20 |nt occur|-nlines |
|000024e0| 32 20 31 20 6f 63 63 75 | 72 2d 6e 75 6d 62 65 72 |2 1 occu|r-number|
|000024f0| 20 70 6f 73 20 22 4e 6f | 20 6f 63 63 75 72 72 65 | pos "No| occurre|
|00002500| 6e 63 65 20 6f 6e 20 74 | 68 69 73 20 6c 69 6e 65 |nce on t|his line|
|00002510| 22 5d 20 34 5d 29 0a 23 | 40 35 30 20 47 6f 20 74 |"] 4]).#|@50 Go t|
|00002520| 6f 20 74 68 65 20 6f 63 | 63 75 72 72 65 6e 63 65 |o the oc|currence|
|00002530| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 6c 69 6e | the cur|rent lin|
|00002540| 65 20 64 65 73 63 72 69 | 62 65 73 2e 1f 0a 28 64 |e descri|bes...(d|
|00002550| 65 66 61 6c 69 61 73 20 | 27 6f 63 63 75 72 2d 6d |efalias |'occur-m|
|00002560| 6f 64 65 2d 67 6f 74 6f | 2d 6f 63 63 75 72 72 65 |ode-goto|-occurre|
|00002570| 6e 63 65 20 23 5b 6e 69 | 6c 20 22 c0 20 19 c2 0b |nce #[ni|l ". ...|
|00002580| 21 88 c4 09 21 62 29 87 | 22 20 5b 6f 63 63 75 72 |!...!b).|" [occur|
|00002590| 2d 6d 6f 64 65 2d 66 69 | 6e 64 2d 6f 63 63 75 72 |-mode-fi|nd-occur|
|000025a0| 72 65 6e 63 65 20 70 6f | 73 20 70 6f 70 2d 74 6f |rence po|s pop-to|
|000025b0| 2d 62 75 66 66 65 72 20 | 6f 63 63 75 72 2d 62 75 |-buffer |occur-bu|
|000025c0| 66 66 65 72 20 6d 61 72 | 6b 65 72 2d 70 6f 73 69 |ffer mar|ker-posi|
|000025d0| 74 69 6f 6e 5d 20 32 20 | 28 23 24 20 2e 20 39 35 |tion] 2 |(#$ . 95|
|000025e0| 30 30 29 20 6e 69 6c 5d | 29 0a 23 40 32 32 37 20 |00) nil]|).#@227 |
|000025f0| 2a 44 65 66 61 75 6c 74 | 20 6e 75 6d 62 65 72 20 |*Default| number |
|00002600| 6f 66 20 63 6f 6e 74 65 | 78 74 20 6c 69 6e 65 73 |of conte|xt lines|
|00002610| 20 74 6f 20 69 6e 63 6c | 75 64 65 20 61 72 6f 75 | to incl|ude arou|
|00002620| 6e 64 20 61 20 60 6c 69 | 73 74 2d 6d 61 74 63 68 |nd a `li|st-match|
|00002630| 69 6e 67 2d 6c 69 6e 65 | 73 27 0a 6d 61 74 63 68 |ing-line|s'.match|
|00002640| 2e 20 20 41 20 6e 65 67 | 61 74 69 76 65 20 6e 75 |. A neg|ative nu|
|00002650| 6d 62 65 72 20 6d 65 61 | 6e 73 20 74 6f 20 69 6e |mber mea|ns to in|
|00002660| 63 6c 75 64 65 20 74 68 | 61 74 20 6d 61 6e 79 20 |clude th|at many |
|00002670| 6c 69 6e 65 73 20 62 65 | 66 6f 72 65 20 74 68 65 |lines be|fore the|
|00002680| 20 6d 61 74 63 68 2e 0a | 41 20 70 6f 73 69 74 69 | match..|A positi|
|00002690| 76 65 20 6e 75 6d 62 65 | 72 20 6d 65 61 6e 73 20 |ve numbe|r means |
|000026a0| 74 6f 20 69 6e 63 6c 75 | 64 65 20 74 68 61 74 20 |to inclu|de that |
|000026b0| 6d 61 6e 79 20 6c 69 6e | 65 73 20 62 6f 74 68 20 |many lin|es both |
|000026c0| 62 65 66 6f 72 65 20 61 | 6e 64 20 61 66 74 65 72 |before a|nd after|
|000026d0| 2e 1f 0a 28 64 65 66 76 | 61 72 20 6c 69 73 74 2d |...(defv|ar list-|
|000026e0| 6d 61 74 63 68 69 6e 67 | 2d 6c 69 6e 65 73 2d 64 |matching|-lines-d|
|000026f0| 65 66 61 75 6c 74 2d 63 | 6f 6e 74 65 78 74 2d 6c |efault-c|ontext-l|
|00002700| 69 6e 65 73 20 30 20 28 | 23 24 20 2e 20 2d 39 37 |ines 0 (|#$ . -97|
|00002710| 31 32 29 29 0a 28 64 65 | 66 61 6c 69 61 73 20 28 |12)).(de|falias (|
|00002720| 71 75 6f 74 65 20 6c 69 | 73 74 2d 6d 61 74 63 68 |quote li|st-match|
|00002730| 69 6e 67 2d 6c 69 6e 65 | 73 29 20 28 71 75 6f 74 |ing-line|s) (quot|
|00002740| 65 20 6f 63 63 75 72 29 | 29 0a 23 40 35 30 37 20 |e occur)|).#@507 |
|00002750| 53 68 6f 77 20 61 6c 6c | 20 6c 69 6e 65 73 20 69 |Show all| lines i|
|00002760| 6e 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 62 75 |n the cu|rrent bu|
|00002770| 66 66 65 72 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 |ffer con|taining |
|00002780| 61 20 6d 61 74 63 68 20 | 66 6f 72 20 52 45 47 45 |a match |for REGE|
|00002790| 58 50 2e 0a 0a 49 66 20 | 61 20 6d 61 74 63 68 20 |XP...If |a match |
|000027a0| 73 70 72 65 61 64 73 20 | 61 63 72 6f 73 73 20 6d |spreads |across m|
|000027b0| 75 6c 74 69 70 6c 65 20 | 6c 69 6e 65 73 2c 20 61 |ultiple |lines, a|
|000027c0| 6c 6c 20 74 68 6f 73 65 | 20 6c 69 6e 65 73 20 61 |ll those| lines a|
|000027d0| 72 65 20 73 68 6f 77 6e | 2e 0a 0a 45 61 63 68 20 |re shown|...Each |
|000027e0| 6c 69 6e 65 20 69 73 20 | 64 69 73 70 6c 61 79 65 |line is |displaye|
|000027f0| 64 20 77 69 74 68 20 4e | 4c 49 4e 45 53 20 6c 69 |d with N|LINES li|
|00002800| 6e 65 73 20 62 65 66 6f | 72 65 20 61 6e 64 20 61 |nes befo|re and a|
|00002810| 66 74 65 72 2c 20 6f 72 | 20 2d 4e 4c 49 4e 45 53 |fter, or| -NLINES|
|00002820| 0a 62 65 66 6f 72 65 20 | 69 66 20 4e 4c 49 4e 45 |.before |if NLINE|
|00002830| 53 20 69 73 20 6e 65 67 | 61 74 69 76 65 2e 0a 4e |S is neg|ative..N|
|00002840| 4c 49 4e 45 53 20 64 65 | 66 61 75 6c 74 73 20 74 |LINES de|faults t|
|00002850| 6f 20 60 6c 69 73 74 2d | 6d 61 74 63 68 69 6e 67 |o `list-|matching|
|00002860| 2d 6c 69 6e 65 73 2d 64 | 65 66 61 75 6c 74 2d 63 |-lines-d|efault-c|
|00002870| 6f 6e 74 65 78 74 2d 6c | 69 6e 65 73 27 2e 0a 49 |ontext-l|ines'..I|
|00002880| 6e 74 65 72 61 63 74 69 | 76 65 6c 79 20 69 74 20 |nteracti|vely it |
|00002890| 69 73 20 74 68 65 20 70 | 72 65 66 69 78 20 61 72 |is the p|refix ar|
|000028a0| 67 2e 0a 0a 54 68 65 20 | 6c 69 6e 65 73 20 61 72 |g...The |lines ar|
|000028b0| 65 20 73 68 6f 77 6e 20 | 69 6e 20 61 20 62 75 66 |e shown |in a buf|
|000028c0| 66 65 72 20 6e 61 6d 65 | 64 20 60 2a 4f 63 63 75 |fer name|d `*Occu|
|000028d0| 72 2a 27 2e 0a 49 74 20 | 73 65 72 76 65 73 20 61 |r*'..It |serves a|
|000028e0| 73 20 61 20 6d 65 6e 75 | 20 74 6f 20 66 69 6e 64 |s a menu| to find|
|000028f0| 20 61 6e 79 20 6f 66 20 | 74 68 65 20 6f 63 63 75 | any of |the occu|
|00002900| 72 72 65 6e 63 65 73 20 | 69 6e 20 74 68 69 73 20 |rrences |in this |
|00002910| 62 75 66 66 65 72 2e 0a | 5c 5b 64 65 73 63 72 69 |buffer..|\[descri|
|00002920| 62 65 2d 6d 6f 64 65 5d | 20 69 6e 20 74 68 61 74 |be-mode]| in that|
|00002930| 20 62 75 66 66 65 72 20 | 77 69 6c 6c 20 65 78 70 | buffer |will exp|
|00002940| 6c 61 69 6e 20 68 6f 77 | 2e 1f 0a 28 64 65 66 61 |lain how|...(defa|
|00002950| 6c 69 61 73 20 27 6f 63 | 63 75 72 20 23 5b 28 72 |lias 'oc|cur #[(r|
|00002960| 65 67 65 78 70 20 26 6f | 70 74 69 6f 6e 61 6c 20 |egexp &o|ptional |
|00002970| 6e 6c 69 6e 65 73 29 20 | 22 08 83 5c 6e 00 c1 08 |nlines) |"..\n...|
|00002980| 21 82 0b 00 5c 6e c3 70 | 5c 66 c5 65 c6 20 1e 07 |!...\n.p|\f.e. ..|
|00002990| 1e 08 1e 09 1e 5c 6e 1e | 0b 1e 5c 66 18 8a 65 62 |.....\n.|..\f..eb|
|000029a0| 88 cd 0e 0e cf c3 23 84 | 34 00 d0 d1 0e 0e 5c 22 |......#.|4.....\"|
|000029b0| 82 e8 01 d2 94 62 88 d3 | 90 8a 0e 14 71 88 0e 5c |.....b..|....q..\|
|000029c0| 6e 14 d5 63 88 c3 1e 16 | d7 0e 0e 21 88 29 d8 d9 |n..c....|...!.)..|
|000029d0| 0e 0b 21 da db b1 04 88 | dc 20 88 0e 0b 16 1d 08 |..!.....|. ......|
|000029e0| 16 1e cf 16 1f 29 0e 0b | 0e 14 3d 83 71 00 64 62 |.....)..|..=.q.db|
|000029f0| 88 8a 0e 08 64 55 84 ba | 01 cd 0e 0e cf c3 23 83 |....dU..|......#.|
|00002a00| ba 01 d2 94 62 88 d2 79 | 88 e0 20 1e 21 e2 8e 0e |....b..y|.. .!...|
|00002a10| 09 e3 0e 08 60 5c 22 5c | 5c 16 09 2a 60 16 08 d2 |....`\"\|\..*`...|
|00002a20| 95 62 88 8a d2 94 62 88 | 08 d2 57 83 b0 00 08 82 |.b....b.|..W.....|
|00002a30| b2 00 08 5b 79 88 60 29 | 1e 24 8a d2 95 62 88 08 |...[y.`)|.$...b..|
|00002a40| d2 56 83 ca 00 08 54 79 | 88 82 cd 00 c5 79 88 60 |.V....Ty|.....y.`|
|00002a50| 29 1e 25 e6 e7 0e 09 5c | 22 1e 28 e9 0e 28 47 ea |).%....\|".(..(G.|
|00002a60| 5c 22 1e 2b cf 1e 2c 8a | c6 20 89 16 2c 60 cf 93 |\".+..,.|. ..,`..|
|00002a70| 88 0e 14 71 88 0e 2c 0e | 1f 42 16 1f 0e 5c 66 84 |...q..,.|.B...\f.|
|00002a80| 06 01 ed 08 21 84 06 01 | ee 63 88 cf 16 5c 66 ef |....!...|.c...\f.|
|00002a90| 0e 0b 0e 24 0e 25 23 88 | 0e 07 60 0e 25 d2 95 5a |...$.%#.|..`.%..Z|
|00002aa0| 5a cf 93 88 f0 0e 25 0e | 24 5a 21 88 08 89 16 2c |Z.....%.|$Z!....,|
|00002ab0| d2 56 83 41 01 0e 2b f1 | b1 02 88 c5 79 88 0e 2c |.V.A..+.|....y..,|
|00002ac0| 53 89 16 2c 82 2a 01 0e | 09 1e 32 60 0e 07 57 83 |S..,.*..|..2`..W.|
|00002ad0| 7d 01 0e 28 84 58 01 e6 | e7 0e 32 5c 22 16 28 0e |}..(.X..|..2\".(.|
|00002ae0| 28 f1 b1 02 88 f3 8a d2 | 79 88 60 29 8a cf 7f 88 |(.......|y.`)....|
|00002af0| 60 29 f4 f5 24 88 c5 79 | 88 cf 16 28 0e 32 54 16 |`)..$..y|...(.2T.|
|00002b00| 32 82 45 01 60 0e 07 58 | 83 95 01 0e 2b f1 b1 02 |2.E.`..X|....+...|
|00002b10| 88 c5 79 88 0e 32 54 16 | 32 82 7d 01 29 0e 2c 08 |..y..2T.|2.}.).,.|
|00002b20| 57 83 af 01 0e 2b f1 b1 | 02 88 c5 79 88 0e 2c 54 |W....+..|...y..,T|
|00002b30| 89 16 2c 82 98 01 64 62 | 88 29 c5 79 88 2d 82 72 |..,...db|.).y.-.r|
|00002b40| 00 0e 14 71 88 0e 1f 9f | 16 1f 65 62 88 0e 1f 47 |...q....|..eb...G|
|00002b50| c5 55 83 d2 01 f6 82 d8 | 01 e6 f7 0e 1f 47 5c 22 |.U......|.....G\"|
|00002b60| 89 1e 38 63 88 74 85 e6 | 01 d0 f9 0e 38 5c 22 2a |..8c.t..|....8\"*|
|00002b70| 91 2e 08 87 22 20 5b 6e | 6c 69 6e 65 73 20 70 72 |...." [n|lines pr|
|00002b80| 65 66 69 78 2d 6e 75 6d | 65 72 69 63 2d 76 61 6c |efix-num|eric-val|
|00002b90| 75 65 20 6c 69 73 74 2d | 6d 61 74 63 68 69 6e 67 |ue list-|matching|
|00002ba0| 2d 6c 69 6e 65 73 2d 64 | 65 66 61 75 6c 74 2d 63 |-lines-d|efault-c|
|00002bb0| 6f 6e 74 65 78 74 2d 6c | 69 6e 65 73 20 74 20 64 |ontext-l|ines t d|
|00002bc0| 65 66 61 75 6c 74 2d 64 | 69 72 65 63 74 6f 72 79 |efault-d|irectory|
|00002bd0| 20 31 20 6d 61 6b 65 2d | 6d 61 72 6b 65 72 20 66 | 1 make-|marker f|
|00002be0| 69 6e 61 6c 2d 63 6f 6e | 74 65 78 74 2d 73 74 61 |inal-con|text-sta|
|00002bf0| 72 74 20 70 72 65 76 70 | 6f 73 20 6c 69 6e 65 6e |rt prevp|os linen|
|00002c00| 75 6d 20 64 69 72 20 62 | 75 66 66 65 72 20 66 69 |um dir b|uffer fi|
|00002c10| 72 73 74 20 72 65 2d 73 | 65 61 72 63 68 2d 66 6f |rst re-s|earch-fo|
|00002c20| 72 77 61 72 64 20 72 65 | 67 65 78 70 20 6e 69 6c |rward re|gexp nil|
|00002c30| 20 6d 65 73 73 61 67 65 | 20 22 4e 6f 20 6d 61 74 | message| "No mat|
|00002c40| 63 68 65 73 20 66 6f 72 | 20 60 25 73 27 22 20 30 |ches for| `%s'" 0|
|00002c50| 20 22 2a 4f 63 63 75 72 | 2a 22 20 73 74 61 6e 64 | "*Occur|*" stand|
|00002c60| 61 72 64 2d 6f 75 74 70 | 75 74 20 22 20 6d 61 74 |ard-outp|ut " mat|
|00002c70| 63 68 69 6e 67 20 22 20 | 70 72 69 6e 74 2d 65 73 |ching " |print-es|
|00002c80| 63 61 70 65 2d 6e 65 77 | 6c 69 6e 65 73 20 70 72 |cape-new|lines pr|
|00002c90| 69 6e 31 20 22 20 69 6e | 20 62 75 66 66 65 72 20 |in1 " in| buffer |
|00002ca0| 22 20 62 75 66 66 65 72 | 2d 6e 61 6d 65 20 34 36 |" buffer|-name 46|
|00002cb0| 20 31 30 20 6f 63 63 75 | 72 2d 6d 6f 64 65 20 6f | 10 occu|r-mode o|
|00002cc0| 63 63 75 72 2d 62 75 66 | 66 65 72 20 6f 63 63 75 |ccur-buf|fer occu|
|00002cd0| 72 2d 6e 6c 69 6e 65 73 | 20 6f 63 63 75 72 2d 70 |r-nlines| occur-p|
|00002ce0| 6f 73 2d 6c 69 73 74 20 | 6d 61 74 63 68 2d 64 61 |os-list |match-da|
|00002cf0| 74 61 20 6d 61 74 63 68 | 2d 64 61 74 61 20 28 28 |ta match|-data ((|
|00002d00| 73 74 6f 72 65 2d 6d 61 | 74 63 68 2d 64 61 74 61 |store-ma|tch-data|
|00002d10| 20 6d 61 74 63 68 2d 64 | 61 74 61 29 29 20 63 6f | match-d|ata)) co|
|00002d20| 75 6e 74 2d 6c 69 6e 65 | 73 20 73 74 61 72 74 20 |unt-line|s start |
|00002d30| 65 6e 64 20 66 6f 72 6d | 61 74 20 22 25 35 64 22 |end form|at "%5d"|
|00002d40| 20 74 61 67 20 6d 61 6b | 65 2d 73 74 72 69 6e 67 | tag mak|e-string|
|00002d50| 20 33 32 20 65 6d 70 74 | 79 20 74 65 6d 20 7a 65 | 32 empt|y tem ze|
|00002d60| 72 6f 70 20 22 2d 2d 2d | 2d 2d 2d 2d 2d 5c 6e 22 |rop "---|-----\n"|
|00002d70| 20 69 6e 73 65 72 74 2d | 62 75 66 66 65 72 2d 73 | insert-|buffer-s|
|00002d80| 75 62 73 74 72 69 6e 67 | 20 62 61 63 6b 77 61 72 |ubstring| backwar|
|00002d90| 64 2d 63 68 61 72 20 35 | 38 20 74 68 69 73 2d 6c |d-char 5|8 this-l|
|00002da0| 69 6e 65 6e 75 6d 20 70 | 75 74 2d 74 65 78 74 2d |inenum p|ut-text-|
|00002db0| 70 72 6f 70 65 72 74 79 | 20 6d 6f 75 73 65 2d 66 |property| mouse-f|
|00002dc0| 61 63 65 20 68 69 67 68 | 6c 69 67 68 74 20 22 31 |ace high|light "1|
|00002dd0| 20 6c 69 6e 65 22 20 22 | 25 64 20 6c 69 6e 65 73 | line" "|%d lines|
|00002de0| 22 20 6d 65 73 73 61 67 | 65 2d 73 74 72 69 6e 67 |" messag|e-string|
|00002df0| 20 22 25 73 20 6d 61 74 | 63 68 65 64 22 5d 20 38 | "%s mat|ched"] 8|
|00002e00| 20 28 23 24 20 2e 20 31 | 30 30 36 34 29 20 28 6c | (#$ . 1|0064) (l|
|00002e10| 69 73 74 20 28 6c 65 74 | 2a 20 28 28 64 65 66 61 |ist (let|* ((defa|
|00002e20| 75 6c 74 20 28 63 61 72 | 20 72 65 67 65 78 70 2d |ult (car| regexp-|
|00002e30| 68 69 73 74 6f 72 79 29 | 29 20 28 69 6e 70 75 74 |history)|) (input|
|00002e40| 20 28 72 65 61 64 2d 66 | 72 6f 6d 2d 6d 69 6e 69 | (read-f|rom-mini|
|00002e50| 62 75 66 66 65 72 20 28 | 69 66 20 64 65 66 61 75 |buffer (|if defau|
|00002e60| 6c 74 20 28 66 6f 72 6d | 61 74 20 22 4c 69 73 74 |lt (form|at "List|
|00002e70| 20 6c 69 6e 65 73 20 6d | 61 74 63 68 69 6e 67 20 | lines m|atching |
|00002e80| 72 65 67 65 78 70 20 28 | 64 65 66 61 75 6c 74 20 |regexp (|default |
|00002e90| 60 25 73 27 29 3a 20 22 | 20 64 65 66 61 75 6c 74 |`%s'): "| default|
|00002ea0| 29 20 22 4c 69 73 74 20 | 6c 69 6e 65 73 20 6d 61 |) "List |lines ma|
|00002eb0| 74 63 68 69 6e 67 20 72 | 65 67 65 78 70 3a 20 22 |tching r|egexp: "|
|00002ec0| 29 20 6e 69 6c 20 6e 69 | 6c 20 6e 69 6c 20 28 71 |) nil ni|l nil (q|
|00002ed0| 75 6f 74 65 20 72 65 67 | 65 78 70 2d 68 69 73 74 |uote reg|exp-hist|
|00002ee0| 6f 72 79 29 29 29 29 20 | 28 69 66 20 28 73 74 72 |ory)))) |(if (str|
|00002ef0| 69 6e 67 2d 65 71 75 61 | 6c 20 69 6e 70 75 74 20 |ing-equa|l input |
|00002f00| 22 22 29 20 64 65 66 61 | 75 6c 74 20 28 73 65 74 |"") defa|ult (set|
|00002f10| 2d 74 65 78 74 2d 70 72 | 6f 70 65 72 74 69 65 73 |-text-pr|operties|
|00002f20| 20 30 20 28 6c 65 6e 67 | 74 68 20 69 6e 70 75 74 | 0 (leng|th input|
|00002f30| 29 20 6e 69 6c 20 69 6e | 70 75 74 29 20 69 6e 70 |) nil in|put) inp|
|00002f40| 75 74 29 29 20 63 75 72 | 72 65 6e 74 2d 70 72 65 |ut)) cur|rent-pre|
|00002f50| 66 69 78 2d 61 72 67 29 | 5d 29 0a 23 40 33 37 20 |fix-arg)|]).#@37 |
|00002f60| 48 65 6c 70 20 6d 65 73 | 73 61 67 65 20 77 68 69 |Help mes|sage whi|
|00002f70| 6c 65 20 69 6e 20 71 75 | 65 72 79 2d 72 65 70 6c |le in qu|ery-repl|
|00002f80| 61 63 65 1f 0a 28 64 65 | 66 63 6f 6e 73 74 20 71 |ace..(de|fconst q|
|00002f90| 75 65 72 79 2d 72 65 70 | 6c 61 63 65 2d 68 65 6c |uery-rep|lace-hel|
|00002fa0| 70 20 22 54 79 70 65 20 | 53 70 61 63 65 20 6f 72 |p "Type |Space or|
|00002fb0| 20 60 79 27 20 74 6f 20 | 72 65 70 6c 61 63 65 20 | `y' to |replace |
|00002fc0| 6f 6e 65 20 6d 61 74 63 | 68 2c 20 44 65 6c 65 74 |one matc|h, Delet|
|00002fd0| 65 20 6f 72 20 60 6e 27 | 20 74 6f 20 73 6b 69 70 |e or `n'| to skip|
|00002fe0| 20 74 6f 20 6e 65 78 74 | 2c 5c 6e 52 45 54 20 6f | to next|,\nRET o|
|00002ff0| 72 20 60 71 27 20 74 6f | 20 65 78 69 74 2c 20 50 |r `q' to| exit, P|
|00003000| 65 72 69 6f 64 20 74 6f | 20 72 65 70 6c 61 63 65 |eriod to| replace|
|00003010| 20 6f 6e 65 20 6d 61 74 | 63 68 20 61 6e 64 20 65 | one mat|ch and e|
|00003020| 78 69 74 2c 5c 6e 43 6f | 6d 6d 61 20 74 6f 20 72 |xit,\nCo|mma to r|
|00003030| 65 70 6c 61 63 65 20 62 | 75 74 20 6e 6f 74 20 6d |eplace b|ut not m|
|00003040| 6f 76 65 20 70 6f 69 6e | 74 20 69 6d 6d 65 64 69 |ove poin|t immedi|
|00003050| 61 74 65 6c 79 2c 5c 6e | 43 2d 72 20 74 6f 20 65 |ately,\n|C-r to e|
|00003060| 6e 74 65 72 20 72 65 63 | 75 72 73 69 76 65 20 65 |nter rec|ursive e|
|00003070| 64 69 74 20 28 5c 5c 5b | 65 78 69 74 2d 72 65 63 |dit (\\[|exit-rec|
|00003080| 75 72 73 69 76 65 2d 65 | 64 69 74 5d 20 74 6f 20 |ursive-e|dit] to |
|00003090| 67 65 74 20 6f 75 74 20 | 61 67 61 69 6e 29 2c 5c |get out |again),\|
|000030a0| 6e 43 2d 77 20 74 6f 20 | 64 65 6c 65 74 65 20 6d |nC-w to |delete m|
|000030b0| 61 74 63 68 20 61 6e 64 | 20 72 65 63 75 72 73 69 |atch and| recursi|
|000030c0| 76 65 20 65 64 69 74 2c | 5c 6e 43 2d 6c 20 74 6f |ve edit,|\nC-l to|
|000030d0| 20 63 6c 65 61 72 20 74 | 68 65 20 73 63 72 65 65 | clear t|he scree|
|000030e0| 6e 2c 20 72 65 64 69 73 | 70 6c 61 79 2c 20 61 6e |n, redis|play, an|
|000030f0| 64 20 6f 66 66 65 72 20 | 73 61 6d 65 20 72 65 70 |d offer |same rep|
|00003100| 6c 61 63 65 6d 65 6e 74 | 20 61 67 61 69 6e 2c 5c |lacement| again,\|
|00003110| 6e 21 20 74 6f 20 72 65 | 70 6c 61 63 65 20 61 6c |n! to re|place al|
|00003120| 6c 20 72 65 6d 61 69 6e | 69 6e 67 20 6d 61 74 63 |l remain|ing matc|
|00003130| 68 65 73 20 77 69 74 68 | 20 6e 6f 20 6d 6f 72 65 |hes with| no more|
|00003140| 20 71 75 65 73 74 69 6f | 6e 73 2c 5c 6e 5e 20 74 | questio|ns,\n^ t|
|00003150| 6f 20 6d 6f 76 65 20 70 | 6f 69 6e 74 20 62 61 63 |o move p|oint bac|
|00003160| 6b 20 74 6f 20 70 72 65 | 76 69 6f 75 73 20 6d 61 |k to pre|vious ma|
|00003170| 74 63 68 2e 22 20 28 23 | 24 20 2e 20 31 32 31 32 |tch." (#|$ . 1212|
|00003180| 38 29 29 0a 23 40 33 30 | 31 20 4b 65 79 6d 61 70 |8)).#@30|1 Keymap|
|00003190| 20 74 68 61 74 20 64 65 | 66 69 6e 65 73 20 74 68 | that de|fines th|
|000031a0| 65 20 72 65 73 70 6f 6e | 73 65 73 20 74 6f 20 71 |e respon|ses to q|
|000031b0| 75 65 73 74 69 6f 6e 73 | 20 69 6e 20 60 71 75 65 |uestions| in `que|
|000031c0| 72 79 2d 72 65 70 6c 61 | 63 65 27 2e 0a 54 68 65 |ry-repla|ce'..The|
|000031d0| 20 22 62 69 6e 64 69 6e | 67 73 22 20 69 6e 20 74 | "bindin|gs" in t|
|000031e0| 68 69 73 20 6d 61 70 20 | 61 72 65 20 6e 6f 74 20 |his map |are not |
|000031f0| 63 6f 6d 6d 61 6e 64 73 | 3b 20 74 68 65 79 20 61 |commands|; they a|
|00003200| 72 65 20 61 6e 73 77 65 | 72 73 2e 0a 54 68 65 20 |re answe|rs..The |
|00003210| 76 61 6c 69 64 20 61 6e | 73 77 65 72 73 20 69 6e |valid an|swers in|
|00003220| 63 6c 75 64 65 20 60 61 | 63 74 27 2c 20 60 73 6b |clude `a|ct', `sk|
|00003230| 69 70 27 2c 20 60 61 63 | 74 2d 61 6e 64 2d 73 68 |ip', `ac|t-and-sh|
|00003240| 6f 77 27 2c 0a 60 65 78 | 69 74 27 2c 20 60 61 63 |ow',.`ex|it', `ac|
|00003250| 74 2d 61 6e 64 2d 65 78 | 69 74 27 2c 20 60 65 64 |t-and-ex|it', `ed|
|00003260| 69 74 27 2c 20 60 64 65 | 6c 65 74 65 2d 61 6e 64 |it', `de|lete-and|
|00003270| 2d 65 64 69 74 27 2c 20 | 60 72 65 63 65 6e 74 65 |-edit', |`recente|
|00003280| 72 27 2c 0a 60 61 75 74 | 6f 6d 61 74 69 63 27 2c |r',.`aut|omatic',|
|00003290| 20 60 62 61 63 6b 75 70 | 27 2c 20 60 65 78 69 74 | `backup|', `exit|
|000032a0| 2d 70 72 65 66 69 78 27 | 2c 20 61 6e 64 20 60 68 |-prefix'|, and `h|
|000032b0| 65 6c 70 27 2e 1f 0a 28 | 64 65 66 76 61 72 20 71 |elp'...(|defvar q|
|000032c0| 75 65 72 79 2d 72 65 70 | 6c 61 63 65 2d 6d 61 70 |uery-rep|lace-map|
|000032d0| 20 28 6d 61 6b 65 2d 73 | 70 61 72 73 65 2d 6b 65 | (make-s|parse-ke|
|000032e0| 79 6d 61 70 29 20 28 23 | 24 20 2e 20 31 32 36 38 |ymap) (#|$ . 1268|
|000032f0| 32 29 29 0a 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |2)).(byt|e-code "|
|00003300| c0 09 c2 c3 23 88 c0 09 | c4 c5 23 88 c0 09 c6 c5 |....#...|..#.....|
|00003310| 23 88 c0 09 c7 c5 23 88 | c0 09 c8 c3 23 88 c0 09 |#.....#.|....#...|
|00003320| c9 c5 23 88 c0 09 ca c3 | 23 88 c0 09 cb c5 23 88 |..#.....|#.....#.|
|00003330| c0 09 cc cd 23 88 c0 09 | ce cf 23 88 c0 09 d0 cf |....#...|..#.....|
|00003340| 23 88 c0 09 d1 cf 23 88 | c0 09 d2 d3 23 88 c0 09 |#.....#.|....#...|
|00003350| d4 d5 23 88 c0 09 d6 d7 | 23 88 c0 09 d8 d9 23 88 |..#.....|#.....#.|
|00003360| c0 09 da db 23 88 c0 09 | dc dd 23 88 c0 09 de df |....#...|..#.....|
|00003370| 23 88 c0 09 e0 df 23 88 | c0 09 e1 df 23 88 c0 09 |#.....#.|....#...|
|00003380| e2 df 23 88 c0 09 e3 e4 | 23 88 c0 09 e5 e4 23 88 |..#.....|#.....#.|
|00003390| c0 09 e6 e7 23 88 c0 09 | e8 e7 23 87 22 20 5b 64 |....#...|..#." [d|
|000033a0| 65 66 69 6e 65 2d 6b 65 | 79 20 71 75 65 72 79 2d |efine-ke|y query-|
|000033b0| 72 65 70 6c 61 63 65 2d | 6d 61 70 20 22 20 22 20 |replace-|map " " |
|000033c0| 61 63 74 20 22 7f 22 20 | 73 6b 69 70 20 5b 64 65 |act "." |skip [de|
|000033d0| 6c 65 74 65 5d 20 5b 62 | 61 63 6b 73 70 61 63 65 |lete] [b|ackspace|
|000033e0| 5d 20 22 79 22 20 22 6e | 22 20 22 59 22 20 22 4e |] "y" "n|" "Y" "N|
|000033f0| 22 20 22 2c 22 20 61 63 | 74 2d 61 6e 64 2d 73 68 |" "," ac|t-and-sh|
|00003400| 6f 77 20 22 71 22 20 65 | 78 69 74 20 22 0d 22 20 |ow "q" e|xit "." |
|00003410| 5b 72 65 74 75 72 6e 5d | 20 22 2e 22 20 61 63 74 |[return]| "." act|
|00003420| 2d 61 6e 64 2d 65 78 69 | 74 20 22 12 22 20 65 64 |-and-exi|t "." ed|
|00003430| 69 74 20 22 17 22 20 64 | 65 6c 65 74 65 2d 61 6e |it "." d|elete-an|
|00003440| 64 2d 65 64 69 74 20 22 | 5c 66 22 20 72 65 63 65 |d-edit "|\f" rece|
|00003450| 6e 74 65 72 20 22 21 22 | 20 61 75 74 6f 6d 61 74 |nter "!"| automat|
|00003460| 69 63 20 22 5e 22 20 62 | 61 63 6b 75 70 20 22 08 |ic "^" b|ackup ".|
|00003470| 22 20 68 65 6c 70 20 5b | 66 31 5d 20 5b 68 65 6c |" help [|f1] [hel|
|00003480| 70 5d 20 22 3f 22 20 22 | 07 22 20 71 75 69 74 20 |p] "?" "|." quit |
|00003490| 22 1d 22 20 22 1b 22 20 | 65 78 69 74 2d 70 72 65 |"." "." |exit-pre|
|000034a0| 66 69 78 20 5b 65 73 63 | 61 70 65 5d 5d 20 34 29 |fix [esc|ape]] 4)|
|000034b0| 0a 23 40 33 37 33 20 53 | 75 62 72 6f 75 74 69 6e |.#@373 S|ubroutin|
|000034c0| 65 20 6f 66 20 60 71 75 | 65 72 79 2d 72 65 70 6c |e of `qu|ery-repl|
|000034d0| 61 63 65 27 2e 20 20 49 | 74 73 20 63 6f 6d 70 6c |ace'. I|ts compl|
|000034e0| 65 78 69 74 79 20 68 61 | 6e 64 6c 65 73 20 69 6e |exity ha|ndles in|
|000034f0| 74 65 72 61 63 74 69 76 | 65 20 71 75 65 72 69 65 |teractiv|e querie|
|00003500| 73 2e 0a 44 6f 6e 27 74 | 20 75 73 65 20 74 68 69 |s..Don't| use thi|
|00003510| 73 20 69 6e 20 79 6f 75 | 72 20 6f 77 6e 20 70 72 |s in you|r own pr|
|00003520| 6f 67 72 61 6d 20 75 6e | 6c 65 73 73 20 79 6f 75 |ogram un|less you|
|00003530| 20 77 61 6e 74 20 74 6f | 20 71 75 65 72 79 20 61 | want to| query a|
|00003540| 6e 64 20 73 65 74 20 74 | 68 65 20 6d 61 72 6b 0a |nd set t|he mark.|
|00003550| 6a 75 73 74 20 61 73 20 | 60 71 75 65 72 79 2d 72 |just as |`query-r|
|00003560| 65 70 6c 61 63 65 27 20 | 64 6f 65 73 2e 20 20 49 |eplace' |does. I|
|00003570| 6e 73 74 65 61 64 2c 20 | 77 72 69 74 65 20 61 20 |nstead, |write a |
|00003580| 73 69 6d 70 6c 65 20 6c | 6f 6f 70 20 6c 69 6b 65 |simple l|oop like|
|00003590| 20 74 68 69 73 3a 0a 20 | 20 28 77 68 69 6c 65 20 | this:. | (while |
|000035a0| 28 72 65 2d 73 65 61 72 | 63 68 2d 66 6f 72 77 61 |(re-sear|ch-forwa|
|000035b0| 72 64 20 22 66 6f 6f 5b | 20 09 5d 2b 62 61 72 22 |rd "foo[| .]+bar"|
|000035c0| 20 6e 69 6c 20 74 29 0a | 20 20 20 20 28 72 65 70 | nil t).| (rep|
|000035d0| 6c 61 63 65 2d 6d 61 74 | 63 68 20 22 66 6f 6f 62 |lace-mat|ch "foob|
|000035e0| 61 72 22 20 6e 69 6c 20 | 6e 69 6c 29 29 0a 77 68 |ar" nil |nil)).wh|
|000035f0| 69 63 68 20 77 69 6c 6c | 20 72 75 6e 20 66 61 73 |ich will| run fas|
|00003600| 74 65 72 20 61 6e 64 20 | 70 72 6f 62 61 62 6c 79 |ter and |probably|
|00003610| 20 64 6f 20 65 78 61 63 | 74 6c 79 20 77 68 61 74 | do exac|tly what|
|00003620| 20 79 6f 75 20 77 61 6e | 74 2e 1f 0a 28 64 65 66 | you wan|t...(def|
|00003630| 61 6c 69 61 73 20 27 70 | 65 72 66 6f 72 6d 2d 72 |alias 'p|erform-r|
|00003640| 65 70 6c 61 63 65 20 23 | 5b 28 66 72 6f 6d 2d 73 |eplace #|[(from-s|
|00003650| 74 72 69 6e 67 20 72 65 | 70 6c 61 63 65 6d 65 6e |tring re|placemen|
|00003660| 74 73 20 71 75 65 72 79 | 2d 66 6c 61 67 20 72 65 |ts query|-flag re|
|00003670| 67 65 78 70 2d 66 6c 61 | 67 20 64 65 6c 69 6d 69 |gexp-fla|g delimi|
|00003680| 74 65 64 2d 66 6c 61 67 | 20 26 6f 70 74 69 6f 6e |ted-flag| &option|
|00003690| 61 6c 20 72 65 70 65 61 | 74 2d 63 6f 75 6e 74 20 |al repea|t-count |
|000036a0| 6d 61 70 29 20 22 08 84 | 06 00 09 10 5c 6e 85 12 |map) "..|....\n..|
|000036b0| 00 0b 85 12 00 5c 66 89 | 97 98 3f 0d 3f 0d 83 1d |.....\f.|..?.?...|
|000036c0| 00 c6 82 1e 00 c7 5c 66 | c8 89 c9 ca c8 c9 89 c8 |......\f|........|
|000036d0| ca 0e 0b 85 30 00 cc cd | 21 1e 0e 1e 0f 1e 10 1e |....0...|!.......|
|000036e0| 11 1e 12 1e 13 1e 14 1e | 15 1e 16 1e 17 1e 18 1e |........|........|
|000036f0| 19 1e 1a 1e 1b 0e 1c 3b | 83 59 00 0e 1c 16 16 82 |.......;|.Y......|
|00003700| 61 00 0e 1d 84 61 00 de | 16 1d 0e 1f 83 79 00 c6 |a....a..|.....y..|
|00003710| 16 19 e0 0d 83 72 00 5c | 66 82 75 00 e1 5c 66 21 |.....r.\|f.u..\f!|
|00003720| e0 51 16 18 e2 20 88 e3 | 20 88 e4 8e 0e 14 83 fb |.Q... ..| .......|
|00003730| 02 6d 84 fb 02 0e 19 0e | 18 c8 ca 23 83 fb 02 0e |.m......|...#....|
|00003740| 10 60 3d 84 ac 00 0d 83 | bd 00 0e 10 c9 94 3d 83 |.`=.....|......=.|
|00003750| bd 00 0e 0f 84 bd 00 6d | 84 fb 02 de 75 88 0e 19 |.......m|....u...|
|00003760| 0e 18 c8 ca 23 82 be 00 | ca 83 fb 02 e5 20 16 17 |....#...|..... ..|
|00003770| 0d 83 cf 00 e6 0e 18 21 | 16 0f 0e 1c 3c 83 f4 00 |.......!|....<...|
|00003780| 0e 12 0e 11 55 83 f4 00 | 0e 12 0e 1d 5c 5c 16 12 |....U...|....\\..|
|00003790| 0e 15 0e 1c 38 16 16 0e | 15 54 0e 1c 47 a6 16 15 |....8...|.T..G...|
|000037a0| 0e 0b 84 0f 01 e7 0e 17 | 21 88 e8 0e 16 0e 1b 0e |........|!.......|
|000037b0| 1a 23 88 0e 11 54 16 11 | 82 f5 02 e3 20 88 c8 89 |.#...T..|.... ...|
|000037c0| 89 89 1e 29 1e 2a 1e 2b | 1e 2c 0e 2c 84 d5 02 e7 |...).*.+|.,.,....|
|000037d0| 0e 17 21 88 ed c9 94 c9 | 95 5c 22 88 c8 1e 2e ce |..!.....|.\".....|
|000037e0| 0e 0e 5c 66 0e 16 23 88 | 29 ef 20 16 2a f0 0e 2a |..\f..#.|). .*..*|
|000037f0| 21 16 2a f1 08 0e 2a 5c | 22 89 16 29 f2 3d 83 79 |!.*...*\|"..).=.y|
|00003800| 01 f3 90 f4 f5 0d 83 5e | 01 f6 82 5f 01 f7 5c 66 |.......^|..._..\f|
|00003810| f8 0e 16 f9 cc 0e 3a 21 | b0 07 21 88 8a 0e 3b 71 |......:!|..!...;q|
|00003820| 88 fc 20 29 91 88 82 1e | 01 0e 29 fd 3d 83 8a 01 |.. )....|..).=...|
|00003830| c8 16 14 ca 89 16 2c 82 | 20 01 0e 29 fe 3d 83 d0 |......,.| ..).=..|
|00003840| 01 0e 13 83 b9 01 0e 13 | 40 89 1e 3f 40 62 88 0e |........|@..?@b..|
|00003850| 3f 41 ca 3d 89 16 2b 84 | b0 01 e7 0e 3f 41 21 88 |?A.=..+.|....?A!.|
|00003860| 0e 13 41 16 13 29 82 1e | 01 ce 81 40 00 21 88 81 |..A..)..|...@.!..|
|00003870| 41 00 81 42 00 21 88 81 | 43 00 de 21 88 82 1e 01 |A..B.!..|C..!....|
|00003880| 0e 29 81 44 00 3d 83 f0 | 01 0e 2b 84 e7 01 e8 0e |.).D.=..|..+.....|
|00003890| 16 0e 1b 0e 1a 23 88 ca | 16 2c ca 16 2b 82 1e 01 |.....#..|.,..+...|
|000038a0| 0e 29 81 45 00 3d 83 13 | 02 0e 2b 84 07 02 e8 0e |.).E.=..|..+.....|
|000038b0| 16 0e 1b 0e 1a 23 88 c8 | 16 14 ca 16 2c ca 16 2b |.....#..|....,..+|
|000038c0| 82 1e 01 0e 29 81 46 00 | 3d 83 30 02 0e 2b 84 1e |....).F.|=.0..+..|
|000038d0| 01 e8 0e 16 0e 1b 0e 1a | 23 88 ca 16 2b 82 1e 01 |........|#...+...|
|000038e0| 0e 29 81 47 00 3d 83 53 | 02 0e 2b 84 47 02 e8 0e |.).G.=.S|..+.G...|
|000038f0| 16 0e 1b 0e 1a 23 88 ca | 16 2c c8 16 0b ca 16 2b |.....#..|.,.....+|
|00003900| 82 1e 01 0e 29 81 48 00 | 3d 83 63 02 ca 89 16 2c |....).H.|=.c....,|
|00003910| 82 20 01 0e 29 81 49 00 | 3d 83 75 02 81 49 00 c8 |. ..).I.|=.u..I..|
|00003920| 21 88 82 1e 01 0e 29 81 | 4a 00 3d 83 97 02 e7 e5 |!.....).|J.=.....|
|00003930| 20 8a 81 4b 00 20 88 29 | 21 88 0d 83 1e 01 e6 0e | ..K. .)|!.......|
|00003940| 18 21 16 0f 82 1e 01 0e | 29 81 4c 00 3d 83 b8 02 |.!......|).L.=...|
|00003950| c9 94 c9 95 7c 88 e7 e5 | 20 8a 81 4b 00 20 88 29 |....|...| ..K. .)|
|00003960| 21 88 ca 16 2b 82 1e 01 | 81 4d 00 16 4e c8 16 14 |!...+...|.M..N...|
|00003970| 81 4f 00 81 50 00 0e 2a | 21 0e 51 5c 22 16 51 ca |.O..P..*|!.Q\".Q.|
|00003980| 89 16 2c 83 23 01 60 0e | 2b 86 e4 02 81 52 00 81 |..,.#.`.|+....R..|
|00003990| 53 00 e5 20 5c 22 42 0e | 13 42 16 13 0e 2b 83 f4 |S.. \"B.|.B...+..|
|000039a0| 02 0e 11 54 16 11 2c 60 | 16 10 82 81 00 29 0e 51 |...T..,`|.....).Q|
|000039b0| 84 16 03 ce 81 54 00 0e | 11 89 de 55 83 11 03 f7 |.....T..|...U....|
|000039c0| 82 14 03 81 55 00 23 88 | 0e 14 85 1d 03 0e 13 2e |....U.#.|........|
|000039d0| 0e 87 22 20 5b 6d 61 70 | 20 71 75 65 72 79 2d 72 |.." [map| query-r|
|000039e0| 65 70 6c 61 63 65 2d 6d | 61 70 20 63 61 73 65 2d |eplace-m|ap case-|
|000039f0| 66 6f 6c 64 2d 73 65 61 | 72 63 68 20 63 61 73 65 |fold-sea|rch case|
|00003a00| 2d 72 65 70 6c 61 63 65 | 20 66 72 6f 6d 2d 73 74 |-replace| from-st|
|00003a10| 72 69 6e 67 20 72 65 67 | 65 78 70 2d 66 6c 61 67 |ring reg|exp-flag|
|00003a20| 20 72 65 2d 73 65 61 72 | 63 68 2d 66 6f 72 77 61 | re-sear|ch-forwa|
|00003a30| 72 64 20 73 65 61 72 63 | 68 2d 66 6f 72 77 61 72 |rd searc|h-forwar|
|00003a40| 64 20 6e 69 6c 20 30 20 | 74 20 71 75 65 72 79 2d |d nil 0 |t query-|
|00003a50| 66 6c 61 67 20 73 75 62 | 73 74 69 74 75 74 65 2d |flag sub|stitute-|
|00003a60| 63 6f 6d 6d 61 6e 64 2d | 6b 65 79 73 20 22 51 75 |command-|keys "Qu|
|00003a70| 65 72 79 20 72 65 70 6c | 61 63 69 6e 67 20 25 73 |ery repl|acing %s|
|00003a80| 20 77 69 74 68 20 25 73 | 3a 20 28 5c 5c 3c 71 75 | with %s|: (\\<qu|
|00003a90| 65 72 79 2d 72 65 70 6c | 61 63 65 2d 6d 61 70 3e |ery-repl|ace-map>|
|00003aa0| 5c 5c 5b 68 65 6c 70 5d | 20 66 6f 72 20 68 65 6c |\\[help]| for hel|
|00003ab0| 70 29 20 22 20 6d 65 73 | 73 61 67 65 20 6d 61 74 |p) " mes|sage mat|
|00003ac0| 63 68 2d 61 67 61 69 6e | 20 6c 61 73 74 72 65 70 |ch-again| lastrep|
|00003ad0| 6c 20 72 65 70 6c 61 63 | 65 2d 63 6f 75 6e 74 20 |l replac|e-count |
|00003ae0| 6e 65 78 74 2d 72 6f 74 | 61 74 65 2d 63 6f 75 6e |next-rot|ate-coun|
|00003af0| 74 20 73 74 61 63 6b 20 | 6b 65 65 70 2d 67 6f 69 |t stack |keep-goi|
|00003b00| 6e 67 20 72 65 70 6c 61 | 63 65 6d 65 6e 74 2d 69 |ng repla|cement-i|
|00003b10| 6e 64 65 78 20 6e 65 78 | 74 2d 72 65 70 6c 61 63 |ndex nex|t-replac|
|00003b20| 65 6d 65 6e 74 20 72 65 | 61 6c 2d 6d 61 74 63 68 |ement re|al-match|
|00003b30| 2d 64 61 74 61 20 73 65 | 61 72 63 68 2d 73 74 72 |-data se|arch-str|
|00003b40| 69 6e 67 20 73 65 61 72 | 63 68 2d 66 75 6e 63 74 |ing sear|ch-funct|
|00003b50| 69 6f 6e 20 6c 69 74 65 | 72 61 6c 20 6e 6f 63 61 |ion lite|ral noca|
|00003b60| 73 69 66 79 20 72 65 70 | 6c 61 63 65 6d 65 6e 74 |sify rep|lacement|
|00003b70| 73 20 72 65 70 65 61 74 | 2d 63 6f 75 6e 74 20 31 |s repeat|-count 1|
|00003b80| 20 64 65 6c 69 6d 69 74 | 65 64 2d 66 6c 61 67 20 | delimit|ed-flag |
|00003b90| 22 5c 5c 62 22 20 72 65 | 67 65 78 70 2d 71 75 6f |"\\b" re|gexp-quo|
|00003ba0| 74 65 20 70 75 73 68 2d | 6d 61 72 6b 20 75 6e 64 |te push-|mark und|
|00003bb0| 6f 2d 62 6f 75 6e 64 61 | 72 79 20 28 28 72 65 70 |o-bounda|ry ((rep|
|00003bc0| 6c 61 63 65 2d 64 65 68 | 69 67 68 6c 69 67 68 74 |lace-deh|ighlight|
|00003bd0| 29 29 20 6d 61 74 63 68 | 2d 64 61 74 61 20 6c 6f |)) match|-data lo|
|00003be0| 6f 6b 69 6e 67 2d 61 74 | 20 73 74 6f 72 65 2d 6d |oking-at| store-m|
|00003bf0| 61 74 63 68 2d 64 61 74 | 61 20 72 65 70 6c 61 63 |atch-dat|a replac|
|00003c00| 65 2d 6d 61 74 63 68 20 | 64 65 66 20 6b 65 79 20 |e-match |def key |
|00003c10| 72 65 70 6c 61 63 65 64 | 20 64 6f 6e 65 20 72 65 |replaced| done re|
|00003c20| 70 6c 61 63 65 2d 68 69 | 67 68 6c 69 67 68 74 20 |place-hi|ghlight |
|00003c30| 6d 65 73 73 61 67 65 2d | 6c 6f 67 2d 6d 61 78 20 |message-|log-max |
|00003c40| 72 65 61 64 2d 65 76 65 | 6e 74 20 76 65 63 74 6f |read-eve|nt vecto|
|00003c50| 72 20 6c 6f 6f 6b 75 70 | 2d 6b 65 79 20 68 65 6c |r lookup|-key hel|
|00003c60| 70 20 22 2a 48 65 6c 70 | 2a 22 20 70 72 69 6e 63 |p "*Help|*" princ|
|00003c70| 20 22 51 75 65 72 79 20 | 72 65 70 6c 61 63 69 6e | "Query |replacin|
|00003c80| 67 20 22 20 22 72 65 67 | 65 78 70 20 22 20 22 22 |g " "reg|exp " ""|
|00003c90| 20 22 20 77 69 74 68 20 | 22 20 22 2e 5c 6e 5c 6e | " with |" ".\n\n|
|00003ca0| 22 20 71 75 65 72 79 2d | 72 65 70 6c 61 63 65 2d |" query-|replace-|
|00003cb0| 68 65 6c 70 20 73 74 61 | 6e 64 61 72 64 2d 6f 75 |help sta|ndard-ou|
|00003cc0| 74 70 75 74 20 68 65 6c | 70 2d 6d 6f 64 65 20 65 |tput hel|p-mode e|
|00003cd0| 78 69 74 20 62 61 63 6b | 75 70 20 65 6c 74 20 22 |xit back|up elt "|
|00003ce0| 4e 6f 20 70 72 65 76 69 | 6f 75 73 20 6d 61 74 63 |No previ|ous matc|
|00003cf0| 68 22 20 64 69 6e 67 20 | 6e 6f 2d 74 65 72 6d 69 |h" ding |no-termi|
|00003d00| 6e 61 74 65 20 73 69 74 | 2d 66 6f 72 20 61 63 74 |nate sit|-for act|
|00003d10| 20 61 63 74 2d 61 6e 64 | 2d 65 78 69 74 20 61 63 | act-and|-exit ac|
|00003d20| 74 2d 61 6e 64 2d 73 68 | 6f 77 20 61 75 74 6f 6d |t-and-sh|ow autom|
|00003d30| 61 74 69 63 20 73 6b 69 | 70 20 72 65 63 65 6e 74 |atic ski|p recent|
|00003d40| 65 72 20 65 64 69 74 20 | 72 65 63 75 72 73 69 76 |er edit |recursiv|
|00003d50| 65 2d 65 64 69 74 20 64 | 65 6c 65 74 65 2d 61 6e |e-edit d|elete-an|
|00003d60| 64 2d 65 64 69 74 20 6d | 6f 64 65 2d 65 78 69 74 |d-edit m|ode-exit|
|00003d70| 65 64 20 74 68 69 73 2d | 63 6f 6d 6d 61 6e 64 20 |ed this-|command |
|00003d80| 61 70 70 65 6e 64 20 6c | 69 73 74 69 66 79 2d 6b |append l|istify-k|
|00003d90| 65 79 2d 73 65 71 75 65 | 6e 63 65 20 75 6e 72 65 |ey-seque|nce unre|
|00003da0| 61 64 2d 63 6f 6d 6d 61 | 6e 64 2d 65 76 65 6e 74 |ad-comma|nd-event|
|00003db0| 73 20 6d 61 70 63 61 72 | 20 23 5b 28 65 6c 74 29 |s mapcar| #[(elt)|
|00003dc0| 20 22 08 85 5c 66 00 c1 | 08 21 08 c2 89 93 88 87 | "..\f..|.!......|
|00003dd0| 22 20 5b 65 6c 74 20 6d | 61 72 6b 65 72 2d 70 6f |" [elt m|arker-po|
|00003de0| 73 69 74 69 6f 6e 20 6e | 69 6c 5d 20 34 5d 20 22 |sition n|il] 4] "|
|00003df0| 52 65 70 6c 61 63 65 64 | 20 25 64 20 6f 63 63 75 |Replaced| %d occu|
|00003e00| 72 72 65 6e 63 65 25 73 | 22 20 22 73 22 5d 20 31 |rrence%s|" "s"] 1|
|00003e10| 36 20 28 23 24 20 2e 20 | 31 33 34 39 35 29 5d 29 |6 (#$ . |13495)])|
|00003e20| 0a 23 40 36 31 20 2a 4e | 6f 6e 2d 6e 69 6c 20 6d |.#@61 *N|on-nil m|
|00003e30| 65 61 6e 73 20 74 6f 20 | 68 69 67 68 6c 69 67 68 |eans to |highligh|
|00003e40| 74 20 77 6f 72 64 73 20 | 64 75 72 69 6e 67 20 71 |t words |during q|
|00003e50| 75 65 72 79 20 72 65 70 | 6c 61 63 65 6d 65 6e 74 |uery rep|lacement|
|00003e60| 2e 1f 0a 28 64 65 66 76 | 61 72 20 71 75 65 72 79 |...(defv|ar query|
|00003e70| 2d 72 65 70 6c 61 63 65 | 2d 68 69 67 68 6c 69 67 |-replace|-highlig|
|00003e80| 68 74 20 6e 69 6c 20 28 | 23 24 20 2e 20 2d 31 35 |ht nil (|#$ . -15|
|00003e90| 39 31 30 29 29 0a 28 62 | 79 74 65 2d 63 6f 64 65 |910)).(b|yte-code|
|00003ea0| 20 22 c0 c1 21 84 08 00 | c2 11 c1 0b 42 13 c2 87 | "..!...|....B...|
|00003eb0| 22 20 5b 62 6f 75 6e 64 | 70 20 72 65 70 6c 61 63 |" [bound|p replac|
|00003ec0| 65 2d 6f 76 65 72 6c 61 | 79 20 6e 69 6c 20 63 75 |e-overla|y nil cu|
|00003ed0| 72 72 65 6e 74 2d 6c 6f | 61 64 2d 6c 69 73 74 5d |rrent-lo|ad-list]|
|00003ee0| 20 32 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 72 | 2).(def|alias 'r|
|00003ef0| 65 70 6c 61 63 65 2d 64 | 65 68 69 67 68 6c 69 67 |eplace-d|ehighlig|
|00003f00| 68 74 20 23 5b 6e 69 6c | 20 22 08 85 0b 00 c1 08 |ht #[nil| "......|
|00003f10| 21 88 c2 89 10 87 22 20 | 5b 72 65 70 6c 61 63 65 |!....." |[replace|
|00003f20| 2d 6f 76 65 72 6c 61 79 | 20 64 65 6c 65 74 65 2d |-overlay| delete-|
|00003f30| 6f 76 65 72 6c 61 79 20 | 6e 69 6c 5d 20 32 5d 29 |overlay |nil] 2])|
|00003f40| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 72 65 70 6c |.(defali|as 'repl|
|00003f50| 61 63 65 2d 68 69 67 68 | 6c 69 67 68 74 20 23 5b |ace-high|light #[|
|00003f60| 28 73 74 61 72 74 20 65 | 6e 64 29 20 22 08 85 23 |(start e|nd) "..#|
|00003f70| 00 09 84 1d 00 c2 0b 5c | 66 5c 22 11 c5 09 c6 c7 |.......\|f\".....|
|00003f80| c8 21 83 1a 00 c8 82 1b | 00 c9 23 88 ca 09 0b 5c |.!......|..#....\|
|00003f90| 66 70 24 87 22 20 5b 71 | 75 65 72 79 2d 72 65 70 |fp$." [q|uery-rep|
|00003fa0| 6c 61 63 65 2d 68 69 67 | 68 6c 69 67 68 74 20 72 |lace-hig|hlight r|
|00003fb0| 65 70 6c 61 63 65 2d 6f | 76 65 72 6c 61 79 20 6d |eplace-o|verlay m|
|00003fc0| 61 6b 65 2d 6f 76 65 72 | 6c 61 79 20 73 74 61 72 |ake-over|lay star|
|00003fd0| 74 20 65 6e 64 20 6f 76 | 65 72 6c 61 79 2d 70 75 |t end ov|erlay-pu|
|00003fe0| 74 20 66 61 63 65 20 69 | 6e 74 65 72 6e 61 6c 2d |t face i|nternal-|
|00003ff0| 66 69 6e 64 2d 66 61 63 | 65 20 71 75 65 72 79 2d |find-fac|e query-|
|00004000| 72 65 70 6c 61 63 65 20 | 72 65 67 69 6f 6e 20 6d |replace |region m|
|00004010| 6f 76 65 2d 6f 76 65 72 | 6c 61 79 5d 20 35 5d 29 |ove-over|lay] 5])|
|00004020| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+